@@ -186,7 +186,7 @@ def test_init_invalid_xtype():
186186 "org_do_args, target_do_args, scale_inputs, expected" ,
187187 [
188188 # Test that scale_to() scales to the correct values
189- # C1: same x-array and y-array, check offset
189+ # C1: Same x-array and y-array, check offset
190190 (
191191 {
192192 "xarray" : np .array ([10 , 15 , 25 , 30 , 60 , 140 ]),
@@ -208,7 +208,7 @@ def test_init_invalid_xtype():
208208 },
209209 {"xtype" : "tth" , "yarray" : np .array ([4.1 , 5.1 , 6.1 , 7.1 , 8.1 , 9.1 ])},
210210 ),
211- # C2: same length x-arrays with exact x-value match
211+ # C2: Same length x-arrays with exact x-value match
212212 (
213213 {
214214 "xarray" : np .array ([10 , 15 , 25 , 30 , 60 , 140 ]),
@@ -230,7 +230,7 @@ def test_init_invalid_xtype():
230230 },
231231 {"xtype" : "tth" , "yarray" : np .array ([1 , 2 , 2.5 , 3 , 6 , 10 ])},
232232 ),
233- # C3: same length x-arrays with approximate x-value match
233+ # C3: Same length x-arrays with approximate x-value match
234234 (
235235 {
236236 "xarray" : np .array ([0.12 , 0.24 , 0.31 , 0.4 ]),
@@ -252,7 +252,7 @@ def test_init_invalid_xtype():
252252 },
253253 {"xtype" : "q" , "yarray" : np .array ([1 , 2 , 4 , 6 ])},
254254 ),
255- # C4: different x-array lengths with approximate x-value match
255+ # C4: Different x-array lengths with approximate x-value match
256256 (
257257 {
258258 "xarray" : np .array ([10 , 25 , 30.1 , 40.2 , 61 , 120 , 140 ]),
@@ -290,7 +290,7 @@ def test_scale_to(org_do_args, target_do_args, scale_inputs, expected):
290290@pytest .mark .parametrize (
291291 "org_do_args, target_do_args, scale_inputs" ,
292292 [
293- # UC1: user did not specify anything
293+ # UC1: User did not specify anything
294294 (
295295 {
296296 "xarray" : np .array ([0.1 , 0.2 , 0.3 ]),
@@ -311,7 +311,7 @@ def test_scale_to(org_do_args, target_do_args, scale_inputs, expected):
311311 "offset" : 0 ,
312312 },
313313 ),
314- # UC2: user specified more than one of q, tth, and d
314+ # UC2: User specified more than one of q, tth, and d
315315 (
316316 {
317317 "xarray" : np .array ([10 , 25 , 30.1 , 40.2 , 61 , 120 , 140 ]),
@@ -352,12 +352,12 @@ def test_scale_to_bad(org_do_args, target_do_args, scale_inputs):
352352@pytest .mark .parametrize (
353353 "wavelength, xarray, yarray, xtype_1, xtype_2, value, expected_index" ,
354354 [
355- # UC1: exact match
355+ # UC1: Exact match
356356 (4 * np .pi , np .array ([30.005 , 60 ]), np .array ([1 , 2 ]), "tth" , "tth" , 30.005 , [0 ]),
357- # UC2: target value lies in the array, returns the (first) closest index
357+ # UC2: Target value lies in the array, returns the (first) closest index
358358 (4 * np .pi , np .array ([30 , 60 ]), np .array ([1 , 2 ]), "tth" , "tth" , 45 , [0 ]),
359359 (4 * np .pi , np .array ([30 , 60 ]), np .array ([1 , 2 ]), "tth" , "q" , 0.25 , [0 ]),
360- # UC3: target value out of the range, returns the closest index
360+ # UC3: Target value out of the range, returns the closest index
361361 (4 * np .pi , np .array ([0.25 , 0.5 , 0.71 ]), np .array ([1 , 2 , 3 ]), "q" , "q" , 0.1 , [0 ]),
362362 (4 * np .pi , np .array ([30 , 60 ]), np .array ([1 , 2 ]), "tth" , "tth" , 63 , [1 ]),
363363 ],
@@ -411,7 +411,7 @@ def test_dump(tmp_path, mocker):
411411@pytest .mark .parametrize (
412412 "do_init_args, expected_do_dict, divide_by_zero_warning_expected" ,
413413 [
414- ( # instantiate just array attributes
414+ ( # Instantiate just array attributes
415415 {
416416 "xarray" : np .array ([0.0 , 90.0 , 180.0 ]),
417417 "yarray" : np .array ([1.0 , 2.0 , 3.0 ]),
@@ -440,7 +440,7 @@ def test_dump(tmp_path, mocker):
440440 },
441441 True ,
442442 ),
443- ( # instantiate just array attributes
443+ ( # Instantiate just array attributes
444444 {
445445 "xarray" : np .array ([np .inf , 2 * np .sqrt (2 ) * np .pi , 2 * np .pi ]),
446446 "yarray" : np .array ([1.0 , 2.0 , 3.0 ]),
@@ -487,11 +487,11 @@ def test_init_valid(do_init_args, expected_do_dict, divide_by_zero_warning_expec
487487@pytest .mark .parametrize (
488488 "do_init_args, expected_error_msg" ,
489489 [
490- ( # C1: no arguments provided
490+ ( # C1: No arguments provided
491491 {},
492492 "missing 3 required positional arguments: 'xarray', 'yarray', and 'xtype'" ,
493493 ),
494- ( # C2: only xarray and yarray provided
494+ ( # C2: Only xarray and yarray provided
495495 {"xarray" : np .array ([0.0 , 90.0 ]), "yarray" : np .array ([0.0 , 90.0 ])},
496496 "missing 1 required positional argument: 'xtype'" ,
497497 ),
0 commit comments