diff --git a/kwant/physics/tests/test_noise.py b/kwant/physics/tests/test_noise.py index 6235c2abf72df72c8b85a1850723b42892275013..1c3434035d2fad786bf7d543f27c73e9134217a0 100644 --- a/kwant/physics/tests/test_noise.py +++ b/kwant/physics/tests/test_noise.py @@ -14,7 +14,7 @@ from kwant.physics import two_terminal_shotnoise from kwant._common import ensure_rng n = 5 -chain = kwant.lattice.chain(norbs=2) +chain = kwant.lattice.chain(norbs=n) def twoterminal_system(): rng = ensure_rng(11) diff --git a/kwant/solvers/tests/_test_sparse.py b/kwant/solvers/tests/_test_sparse.py index 84748086c5bdeb65a68ae35984a63580f4465b81..1183f391a1ef8874daf55b8c2dcf85143ce59751 100644 --- a/kwant/solvers/tests/_test_sparse.py +++ b/kwant/solvers/tests/_test_sparse.py @@ -15,8 +15,8 @@ import kwant from kwant._common import ensure_rng n = 5 -chain = kwant.lattice.chain(norbs=1) -sq = square = kwant.lattice.square(norbs=1) +chain = kwant.lattice.chain(norbs=n) +sq = square = kwant.lattice.square(norbs=n) class LeadWithOnlySelfEnergy: @@ -111,6 +111,8 @@ def test_one_lead(smatrix): # Test that a system with one lead with no propagating modes has a # 0x0 S-matrix. def test_smatrix_shape(smatrix): + chain = kwant.lattice.chain(norbs=1) + system = kwant.Builder() lead0 = kwant.Builder(kwant.TranslationalSymmetry((-1,))) lead1 = kwant.Builder(kwant.TranslationalSymmetry((1,))) @@ -264,6 +266,8 @@ def test_singular_graph_system(smatrix): # zero eigenvalues than the lead hopping matrix. Older version of the # sparse solver failed here. def test_tricky_singular_hopping(smatrix): + sq = kwant.lattice.square(norbs=1) + system = kwant.Builder() lead = kwant.Builder(kwant.TranslationalSymmetry((4, 0))) @@ -294,6 +298,7 @@ def test_tricky_singular_hopping(smatrix): # Test the consistency of transmission and conductance_matrix for a four-lead # system without time-reversal symmetry. def test_many_leads(*factories): + sq = kwant.lattice.square(norbs=1) E=2.1 B=0.01 @@ -512,6 +517,7 @@ def test_arg_passing(wave_function, ldos, smatrix): def hopping(site1, site2, a, b): return b - a + square = kwant.lattice.square(norbs=1) W = 3 L = 4