Skip to content

Commit

Permalink
add tests for #55
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongbo committed Mar 5, 2024
1 parent 9ae3a91 commit 224101a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,29 @@ def test_destroy(selenium_standalone_matplotlib):
plt.plot([1, 2, 3])
plt.show()
plt.close()


@matplotlib_test_decorator
@run_in_pyodide(packages=["matplotlib"])
def test_call_close_multi_times(selenium_standalone_matplotlib):
from matplotlib import pyplot as plt

plt.figure()
plt.plot([1, 2, 3])
plt.show()
plt.close()
plt.close()


@matplotlib_test_decorator
@run_in_pyodide(packages=["matplotlib"])
def test_call_show_and_close_multi_times(selenium_standalone_matplotlib):
from matplotlib import pyplot as plt

plt.figure()
plt.plot([1, 2, 3])
plt.show()
plt.close()
plt.plot([1, 2, 3])
plt.show()
plt.close()

0 comments on commit 224101a

Please sign in to comment.