Commit e439fb80 authored by Joseph Weston's avatar Joseph Weston

add test that display_family should raise when IPython is not available

Also add a test that display_family should run when IPython is available
parent 82c780a2
......@@ -6,7 +6,7 @@ import scipy.linalg as la
from .. import kwant_rmt
from ..hamiltonian_generator import continuum_hamiltonian, check_symmetry, \
bloch_family, make_basis_pretty, constrain_family, continuum_variables, \
continuum_pairing, remove_duplicates, subtract_family
continuum_pairing, remove_duplicates, subtract_family, display_family
from ..groups import PointGroupElement, Model, time_reversal, chiral, rotation
from ..model import _commutative_momenta, Model, BlochModel
from ..linalg import nullspace, family_to_vectors
......@@ -248,3 +248,7 @@ def test_pretty_basis():
else:
assert np.allclose(mat/mat[0, 0], sz), 'Sparsification failed.'
def test_display_family_works():
family = [Model({"k_x": np.identity(2)})]
display_family(family)
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