Skip to content
Snippets Groups Projects
Commit 2a9a4ffb authored by Joseph Weston's avatar Joseph Weston
Browse files

prefer explicit 'allclose' to equality checking

__eq__ for Models just uses allclose anyway.
parent a5cb1ac1
No related branches found
No related tags found
No related merge requests found
......@@ -286,7 +286,7 @@ def test_inverse_transform():
# Convert it back
ham2 = builder_to_model(syst)
# Check that it's the same as the original
assert fam == ham2
assert fam.allclose(ham2)
# Check that the Hamiltonians are identical at random points in the Brillouin zone
sysw = kwant.wraparound.wraparound(syst).finalized()
......@@ -378,8 +378,8 @@ def test_consistency_kwant():
Ham1 = builder_to_model(model_syst, momenta=Ham.momenta)
# From the pure Kwant builder
Ham2 = builder_to_model(kwant_syst, momenta=Ham.momenta)
assert Ham == Ham1
assert Ham == Ham2
assert Ham.allclose(Ham1)
assert Ham.allclose(Ham2)
def test_find_builder_discrete_symmetries():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment