Skip to content

Commit 311bc56

Browse files
changed test inputs to full expressions
1 parent 79c45af commit 311bc56

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
params1 = [
1010
([], ["."]),
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"]),
1414
]
1515

1616

@@ -28,7 +28,7 @@ def test_set_output_directory(inputs, expected, user_filesystem):
2828

2929

3030
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"]
3232
actual_args = get_args(cli_inputs)
3333
with pytest.raises(FileExistsError):
3434
actual_args.output_directory = set_output_directory(actual_args)
@@ -38,9 +38,9 @@ def test_set_output_directory_bad(user_filesystem):
3838

3939
params2 = [
4040
([], [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]),
4444
]
4545

4646

@@ -55,12 +55,15 @@ def test_set_wavelength(inputs, expected):
5555

5656
params3 = [
5757
(
58-
["-a", "invalid"],
58+
["--anode-type", "invalid"],
5959
[f"Anode type not recognized. Please rerun specifying an anode_type from {*known_sources, }."],
6060
),
61-
(["-w", "0"], ["No valid wavelength. Please rerun specifying a known anode_type or a positive wavelength."]),
6261
(
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"],
6467
["No valid wavelength. Please rerun specifying a known anode_type or a positive wavelength."],
6568
),
6669
]

0 commit comments

Comments
 (0)