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

update test that vectorization requires norbs to test infinite systems

parent dd4f537e
No related branches found
No related tags found
No related merge requests found
......@@ -740,15 +740,19 @@ def test_vectorized_hamiltonian_evaluation():
)
def test_vectorized_requires_norbs():
@pytest.mark.parametrize("sym", [
builder.NoSymmetry(),
kwant.TranslationalSymmetry([-1]),
])
def test_vectorized_requires_norbs(sym):
# Catch deprecation warning for lack of norbs
with warnings.catch_warnings():
warnings.simplefilter("ignore")
fam = builder.SimpleSiteFamily()
lat = kwant.lattice.chain()
syst = builder.Builder(vectorize=True)
syst[fam(0, 0)] = 1
syst = builder.Builder(sym, vectorize=True)
syst[lat(0)] = 1
raises(ValueError, syst.finalized)
......
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