Skip to content
Snippets Groups Projects
Commit 12f96175 authored by Antonio Manesco's avatar Antonio Manesco
Browse files

we also don't use this

parent 9166723d
No related branches found
No related tags found
1 merge request!8Builder fixes
Pipeline #181674 failed
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
...@@ -51,7 +51,6 @@ def test_kwant_supercell(seed): ...@@ -51,7 +51,6 @@ def test_kwant_supercell(seed):
"""Test with Kwant supercell and callable onsite and hoppings.""" """Test with Kwant supercell and callable onsite and hoppings."""
np.random.seed(seed) np.random.seed(seed)
ndim = np.random.randint(1, 3) ndim = np.random.randint(1, 3)
cutoff = np.random.randint(1, 3)
sites_in_cell = np.random.randint(1, 4) sites_in_cell = np.random.randint(1, 4)
ndof_per_site = [np.random.randint(1, 4) for site in range(sites_in_cell)] ndof_per_site = [np.random.randint(1, 4) for site in range(sites_in_cell)]
n_cells = np.random.randint(1, 4) n_cells = np.random.randint(1, 4)
...@@ -108,20 +107,16 @@ def test_kwant_supercell(seed): ...@@ -108,20 +107,16 @@ def test_kwant_supercell(seed):
site1, site2 = site_pair[0] site1, site2 = site_pair[0]
if site1 == site2: if site1 == site2:
assert np.isclose( assert np.isclose(
random_builder[site1]( random_builder[site1](site=site1, alpha=params["alpha"], beta=params["beta"]),
site=site1, alpha=params["alpha"], beta=params["beta"]
),
random_builder_test[site1], random_builder_test[site1],
).all() ).all()
else: else:
try: try:
assert np.isclose( assert np.isclose(
random_builder[site1, site2]( random_builder[site1, site2](site1, site2, gamma=params["gamma"], delta=params["delta"]),
site1, site2, gamma=params["gamma"], delta=params["delta"]
),
random_builder_test[site1, site2], random_builder_test[site1, site2],
).all() ).all()
except KeyError: except KeyError:
continue continue
except: except:
raise raise
\ No newline at end of file
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