diff --git a/kwant/tests/test_plotter.py b/kwant/tests/test_plotter.py index 84a3a5c6ab8cc918486e0d1e83d275157f198b6c..11266b4e8e167a46acdb40cb9fcd286c9f74de8f 100644 --- a/kwant/tests/test_plotter.py +++ b/kwant/tests/test_plotter.py @@ -71,13 +71,10 @@ def syst_2d(W=3, r1=3, r2=8): syst[lat.neighbors()] = -t sym_lead0 = kwant.TranslationalSymmetry(lat.vec((-1, 0))) lead0 = kwant.Builder(sym_lead0) - lead2 = kwant.Builder(sym_lead0) lead_shape = lambda pos: (-W / 2 < pos[1] < W / 2) lead0[lat.shape(lead_shape, (0, 0))] = 4 * t - lead2[lat.shape(lead_shape, (0, 0))] = 4 * t - syst.attach_lead(lead2) lead0[lat.neighbors()] = - t lead1 = lead0.reversed() syst.attach_lead(lead0) @@ -123,8 +120,7 @@ def test_plot(): if (color != 'k' and isinstance(color(next(iter(syst2d.sites()))), float)): assert fig.axes[0].collections[0].get_array() is not None - assert len(fig.axes[0].collections) == (8 if syst is syst2d else - 6) + assert len(fig.axes[0].collections) == 6 color_opts = ['k', (lambda site, site2: site.tag[0]), lambda site, site2: (abs(site.tag[0] / 100), abs(site.tag[1] / 100), 0)]