Skip to content

Commit 9343e86

Browse files
committed
Do not call UCs for test function
1 parent 8ebaede commit 9343e86

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/test_transforms.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@
99
@pytest.mark.parametrize(
1010
"wavelength, q, expected_tth",
1111
[
12-
# UC1.1: User specified empty 'q' and no 'wavelength'.
13-
# Expect empty 'tth' array and UserWarning about missing wavelength.
12+
# Case 1: Allow empty arrays for q
13+
# 1. Empty q values, no wavelength, return empty arrays
1414
(None, np.empty((0)), np.empty((0))),
15-
# UC1.2: User specified empty 'q' and 'wavelength'. Expect empty 'tth' array.
15+
# 2. Empty q values, wavelength specified, return empty arrays
1616
(4 * np.pi, np.empty((0)), np.empty(0)),
17-
# UC2.1: User specified non-empty 'q' values and no 'wavelength'.
18-
# Expect non-empty 'tth' array and UserWarning about missing wavelength.
17+
18+
# Case 2: Allow wavelength to be missing.
19+
# Valid q values, no wavelength, return index array
1920
(
2021
None,
2122
np.array([0, 0.2, 0.4, 0.6, 0.8, 1]),
2223
np.array([0, 1, 2, 3, 4, 5]),
2324
),
24-
# UC2.2: User specified non-empty 'q' values and 'wavelength'.
25-
# Expect tth values are 2*arcsin(q) in degrees.
25+
26+
# Case 3: Correctly specified q and wavelength
27+
# Expected tth values are 2*arcsin(q) in degrees
2628
(4 * np.pi, np.array([0, 1 / np.sqrt(2), 1.0]), np.array([0, 90.0, 180.0])),
2729
],
2830
)

0 commit comments

Comments
 (0)