@@ -167,9 +167,26 @@ def test_set_output_directory_bad(user_filesystem):
167
167
@pytest .mark .parametrize (
168
168
"inputs, expected" ,
169
169
[
170
+ # C1: nothing passed in, expect default is Mo
170
171
([], {"wavelength" : 0.71073 , "anode_type" : "Mo" }),
172
+ # C2: only a valid anode type was entered (case independent),
173
+ # expect to match the corresponding wavelength and preserve the correct case anode type
174
+ (["--anode-type" , "Mo" ], {"wavelength" : 0.71073 , "anode_type" : "Mo" }),
175
+ (["--anode-type" , "MoKa1" ], {"wavelength" : 0.70930 , "anode_type" : "MoKa1" }),
176
+ (["--anode-type" , "MoKa1Ka2" ], {"wavelength" : 0.71073 , "anode_type" : "MoKa1Ka2" }),
171
177
(["--anode-type" , "Ag" ], {"wavelength" : 0.56087 , "anode_type" : "Ag" }),
178
+ (["--anode-type" , "AgKa1" ], {"wavelength" : 0.55941 , "anode_type" : "AgKa1" }),
179
+ (["--anode-type" , "AgKa1Ka2" ], {"wavelength" : 0.56087 , "anode_type" : "AgKa1Ka2" }),
180
+ (["--anode-type" , "Cu" ], {"wavelength" : 1.54184 , "anode_type" : "Cu" }),
181
+ (["--anode-type" , "CuKa1" ], {"wavelength" : 1.54056 , "anode_type" : "CuKa1" }),
182
+ (["--anode-type" , "CuKa1Ka2" ], {"wavelength" : 1.54184 , "anode_type" : "CuKa1Ka2" }),
183
+ (["--anode-type" , "moKa1Ka2" ], {"wavelength" : 0.71073 , "anode_type" : "MoKa1Ka2" }),
184
+ (["--anode-type" , "ag" ], {"wavelength" : 0.56087 , "anode_type" : "Ag" }),
185
+ (["--anode-type" , "cuka1" ], {"wavelength" : 1.54056 , "anode_type" : "CuKa1" }),
186
+ # C3: only a valid wavelength was entered, expect to include the wavelength only and anode type is None
172
187
(["--wavelength" , "0.25" ], {"wavelength" : 0.25 , "anode_type" : None }),
188
+ # C4: both valid anode type and wavelength were entered,
189
+ # expect to remove the anode type and preserve wavelength only
173
190
(["--wavelength" , "0.25" , "--anode-type" , "Ag" ], {"wavelength" : 0.25 , "anode_type" : None }),
174
191
],
175
192
)
0 commit comments