Skip to content

Commit 6453f07

Browse files
committed
Allow explicit access to the 'weyl_line' fixture.
1 parent d67e1f5 commit 6453f07

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/hm_systems.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ def weyl_system(request):
9696
return res
9797

9898

99-
@pytest.fixture
100-
def weyl_line(kz):
99+
def weyl_line_creator(kz):
101100
return lambda t: [np.cos(t * 2 * np.pi), np.sin(t * 2 * np.pi), kz]
102101

103102

103+
weyl_line = pytest.fixture(weyl_line_creator)
104+
105+
104106
@pytest.fixture
105107
def weyl_surface():
106108
return z2pack.shape.Sphere([0, 0, 0], 1.)

tests/test_line_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_iterator_2(weyl_system, compare_equal):
9999
"""Test simple line run with special iterator value."""
100100
result = z2pack.line.run(
101101
system=weyl_system,
102-
line=weyl_line(0.1),
102+
line=weyl_line_creator(0.1),
103103
iterator=[4, 12, 21],
104104
pos_tol=1e-12
105105
)

0 commit comments

Comments
 (0)