Commit 52e7cb9d authored by Christoph Groth's avatar Christoph Groth
Browse files

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

parent 37b60f1e
......@@ -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 =
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment