Skip to content

Commit 6570061

Browse files
committed
Refactor test_q_to_tth with full sentence
1 parent b61eaca commit 6570061

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_transforms.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
"wavelength, q, expected_tth",
1111
[
1212
# Test conversion of q to tth with valid values
13-
# C1: Empty q values
14-
# 1. No wavelength, expect empty arrays
15-
(None, np.empty((0)), np.empty((0))),
16-
# 2. 4π wavelength, expect empty arrays
13+
# Case 1: Empty q values are provided (1) with and (2) without wavelength
14+
# 1. Expect empty arrays
1715
(4 * np.pi, np.empty((0)), np.empty(0)),
18-
# C2: Non-empty q values
19-
# 2. No wavelength, expect value tth values
16+
# 2. Expect empty arrays with wavelength warning message
17+
(None, np.empty((0)), np.empty((0))),
18+
# Case 2: Non-empty q values are provided without wavelength
19+
# 1. Expect valid tth values in degrees.
2020
(
2121
None,
2222
np.array([0, 0.2, 0.4, 0.6, 0.8, 1]),
2323
np.array([0, 1, 2, 3, 4, 5]),
2424
),
25-
# C3: Both valid q and wavelength provided
26-
# 1. Expected tth values are 2*arcsin(q) in degrees
25+
# Case 3: Both valid q and wavelength are provided.
26+
# 1. Expect tth values of 2*arcsin(q) in degrees
2727
(4 * np.pi, np.array([0, 1 / np.sqrt(2), 1.0]), np.array([0, 90.0, 180.0])),
2828
],
2929
)

0 commit comments

Comments
 (0)