Skip to content
Snippets Groups Projects
Commit 52e7cb9d authored by Christoph Groth's avatar Christoph Groth
Browse files

add test that imports the plotter without matplotlib (it fails)

parent 37b60f1e
Branches
Tags
No related merge requests found
......@@ -16,6 +16,19 @@ if plotter.mpl_enabled:
from matplotlib import pyplot
def test_importable_without_matplotlib():
prefix, sep, suffix = plotter.__file__.rpartition('.')
if suffix == 'pyc':
suffix = 'py'
assert suffix == 'py'
fname = sep.join((prefix, suffix))
with open(fname) as f:
code = f.read()
code = code.replace('from . import', 'from kwant import')
code = code.replace('matplotlib', 'totalblimp')
exec code
def sys_2d(W=3, r1=3, r2=8):
a = 1
t = 1.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment