From 1dcf9ec93ea00a3735fe02905269387e23e6a056 Mon Sep 17 00:00:00 2001 From: Christoph Groth <christoph.groth@cea.fr> Date: Mon, 26 Aug 2013 22:31:47 +0200 Subject: [PATCH] make comprehensive test more comprehensive --- kwant/tests/test_comprehensive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kwant/tests/test_comprehensive.py b/kwant/tests/test_comprehensive.py index 158fffe0..55494f29 100644 --- a/kwant/tests/test_comprehensive.py +++ b/kwant/tests/test_comprehensive.py @@ -51,5 +51,7 @@ def test_qhe(W=16, L=8): ((5.2, 5.5), 3, 1e-1)]: for r_phi in r_phis: args = (1.0 / r_phi, "") - T_actual = kwant.smatrix(sys, 1.0, args).transmission(1, 0) - assert abs(T_nominal - T_actual) < max_err + pc = sys.precalculate(1.0, args) + for result in [kwant.smatrix(pc, 1, args), + kwant.solvers.default.greens_function(pc, 1, args)]: + assert abs(T_nominal - result.transmission(1, 0)) < max_err -- GitLab