8
8
9
9
params1 = [
10
10
([], ["." ]),
11
- (["-o " , "." ], ["." ]),
12
- (["-o " , "new_dir" ], ["new_dir" ]),
13
- (["-o " , "input_dir" ], ["input_dir" ]),
11
+ (["--output-directory " , "." ], ["." ]),
12
+ (["--output-directory " , "new_dir" ], ["new_dir" ]),
13
+ (["--output-directory " , "input_dir" ], ["input_dir" ]),
14
14
]
15
15
16
16
@@ -28,7 +28,7 @@ def test_set_output_directory(inputs, expected, user_filesystem):
28
28
29
29
30
30
def test_set_output_directory_bad (user_filesystem ):
31
- cli_inputs = ["2.5" , "-o " , "good_data.chi" ]
31
+ cli_inputs = ["2.5" , "--output-directory " , "good_data.chi" ]
32
32
actual_args = get_args (cli_inputs )
33
33
with pytest .raises (FileExistsError ):
34
34
actual_args .output_directory = set_output_directory (actual_args )
@@ -38,9 +38,9 @@ def test_set_output_directory_bad(user_filesystem):
38
38
39
39
params2 = [
40
40
([], [0.71 ]),
41
- (["-a " , "Ag" ], [0.59 ]),
42
- (["-w " , "0.25" ], [0.25 ]),
43
- (["-w " , "0.25" , "-a " , "Ag" ], [0.25 ]),
41
+ (["--anode-type " , "Ag" ], [0.59 ]),
42
+ (["--wavelength " , "0.25" ], [0.25 ]),
43
+ (["--wavelength " , "0.25" , "--anode-type " , "Ag" ], [0.25 ]),
44
44
]
45
45
46
46
@@ -55,12 +55,15 @@ def test_set_wavelength(inputs, expected):
55
55
56
56
params3 = [
57
57
(
58
- ["-a " , "invalid" ],
58
+ ["--anode-type " , "invalid" ],
59
59
[f"Anode type not recognized. Please rerun specifying an anode_type from { * known_sources , } ." ],
60
60
),
61
- (["-w" , "0" ], ["No valid wavelength. Please rerun specifying a known anode_type or a positive wavelength." ]),
62
61
(
63
- ["-w" , "-1" , "-a" , "Mo" ],
62
+ ["--wavelength" , "0" ],
63
+ ["No valid wavelength. Please rerun specifying a known anode_type or a positive wavelength." ],
64
+ ),
65
+ (
66
+ ["--wavelength" , "-1" , "--anode-type" , "Mo" ],
64
67
["No valid wavelength. Please rerun specifying a known anode_type or a positive wavelength." ],
65
68
),
66
69
]
0 commit comments