Fixed database typo and removed unnecessary class identifier.
This commit is contained in:
parent
00ad49a143
commit
45fb349a7d
5098 changed files with 952558 additions and 85 deletions
|
@ -0,0 +1,27 @@
|
|||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize("backend", ["webagg", "nbagg"])
|
||||
def test_webagg_fallback(backend):
|
||||
pytest.importorskip("tornado")
|
||||
if backend == "nbagg":
|
||||
pytest.importorskip("IPython")
|
||||
env = dict(os.environ)
|
||||
if os.name != "nt":
|
||||
env["DISPLAY"] = ""
|
||||
|
||||
env["MPLBACKEND"] = backend
|
||||
|
||||
test_code = (
|
||||
"import os;"
|
||||
+ f"assert os.environ['MPLBACKEND'] == '{backend}';"
|
||||
+ "import matplotlib.pyplot as plt; "
|
||||
+ "print(plt.get_backend());"
|
||||
f"assert '{backend}' == plt.get_backend().lower();"
|
||||
)
|
||||
ret = subprocess.call([sys.executable, "-c", test_code], env=env)
|
||||
|
||||
assert ret == 0
|
Loading…
Add table
Add a link
Reference in a new issue