Skip to content

Commit ade6f59

Browse files
committed
Update tests for the check of even number of WCC in Z2 invariant.
1 parent fb0a81e commit ade6f59

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_z2_invariant.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import random
55

66
import pytest
7+
import numpy as np
8+
79
import z2pack
810

911
from monkeypatch_data import * # pylint: disable=unused-wildcard-import
@@ -38,11 +40,11 @@ def test_trivial(num_lines, num_wcc, patch_surface_data):
3840
assert z2pack.invariant.z2(data, check_kramers_pairs=False) == 0
3941

4042

41-
def test_not_even_number_wcc(N, M, patch_surface_data): # pylint: disable=invalid-name
43+
def test_not_even_number_wcc(num_lines, num_wcc, patch_surface_data):
4244
"""
4345
Test that the Kramers pairs check raises when an odd number of WCC is present.
4446
"""
45-
wcc = [np.linspace(0, 1, 2 * M + 1) for j in range(N + 1)]
47+
wcc = [np.linspace(0, 1, num_wcc + 1) for j in range(num_lines + 1)]
4648
data = SurfaceData(wcc)
4749
with pytest.raises(ValueError):
4850
z2pack.invariant.z2(data)

0 commit comments

Comments
 (0)