Skip to content

Commit ef75197

Browse files
committed
improve UC comment for test_q_to_tth func
1 parent cdf96df commit ef75197

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/test_transforms.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@
99
@pytest.mark.parametrize(
1010
"wavelength, q, expected_tth",
1111
[
12-
# UC1: Empty q values, no wavelength, return empty arrays
12+
# UC1.1: User specified empty 'q' and no 'wavelength'.
13+
# Expect empty 'tth' array and UserWarning about missing wavelength.
1314
(None, np.empty((0)), np.empty((0))),
14-
# UC2: Empty q values, wavelength specified, return empty arrays
15+
16+
# UC1.2: User specified empty 'q' and 'wavelength'. Expect empty 'tth' array.
1517
(4 * np.pi, np.empty((0)), np.empty(0)),
16-
# UC3: user specified valid q values, no wavelength, return empty arrays
18+
19+
# UC2.1: User specified non-empty 'q' values and no 'wavelength'.
20+
# Expect non-empty 'tth' array and UserWarning about missing wavelength.
1721
(
1822
None,
1923
np.array([0, 0.2, 0.4, 0.6, 0.8, 1]),
2024
np.array([0, 1, 2, 3, 4, 5]),
2125
),
22-
# UC4: user specified valid q values (with wavelength)
23-
# expected tth values are 2*arcsin(q) in degrees
26+
27+
# UC2.2: User specified non-empty 'q' values and 'wavelength'.
28+
# Expect tth values are 2*arcsin(q) in degrees.
2429
(4 * np.pi, np.array([0, 1 / np.sqrt(2), 1.0]), np.array([0, 90.0, 180.0])),
2530
],
2631
)

0 commit comments

Comments
 (0)