From 17e0aa5bd213d29865c781de01a5715b9decd395 Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph.weston@cea.fr> Date: Fri, 7 Aug 2015 19:14:13 +0200 Subject: [PATCH] update rng in test to take list, rather than dict --- kwant/tests/test_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kwant/tests/test_builder.py b/kwant/tests/test_builder.py index 6b18541d..920bc2ff 100644 --- a/kwant/tests/test_builder.py +++ b/kwant/tests/test_builder.py @@ -302,7 +302,7 @@ def test_finalization(): def set_hops(dest, sites): while len(dest) < n_hops: - a, b = rng.sample(sites, 2) + a, b = rng.sample(list(sites), 2) if (a, b) not in dest and (b, a) not in dest: dest[a, b] = random_hopping_integral(rng) -- GitLab