72
72
def test_set_input_lists (inputs , expected , user_filesystem ):
73
73
base_dir = Path (user_filesystem )
74
74
os .chdir (base_dir )
75
- expected_paths = [Path ( user_filesystem ) .resolve () / expected_path for expected_path in expected ]
75
+ expected_paths = [base_dir .resolve () / expected_path for expected_path in expected ]
76
76
77
77
cli_inputs = ["2.5" ] + inputs
78
78
actual_args = get_args (cli_inputs )
@@ -88,20 +88,6 @@ def test_set_input_lists(inputs, expected, user_filesystem):
88
88
]
89
89
90
90
91
- @pytest .mark .parametrize ("inputs, expected" , params_input_not_cwd )
92
- def test_set_input_files_not_cwd (inputs , expected , user_filesystem ):
93
- expected_input_directory = []
94
- for expected_path in expected :
95
- expected_input_directory .append (Path (user_filesystem ) / expected_path )
96
- actual_input = [str (Path (user_filesystem ) / inputs [0 ])]
97
- os .chdir ("input_dir" )
98
-
99
- cli_inputs = ["2.5" ] + actual_input
100
- actual_args = get_args (cli_inputs )
101
- actual_args = set_input_lists (actual_args )
102
- assert set (actual_args .input_directory ) == set (expected_input_directory )
103
-
104
-
105
91
# This test covers non-existing single input file or directory, in this case we raise an error with message
106
92
params_input_bad = [
107
93
(["non_existing_file.xy" ], "Please specify at least one valid input file or directory." ),
@@ -112,15 +98,14 @@ def test_set_input_files_not_cwd(inputs, expected, user_filesystem):
112
98
113
99
@pytest .mark .parametrize ("inputs, msg" , params_input_bad )
114
100
def test_set_input_files_bad (inputs , msg , user_filesystem ):
101
+ base_dir = Path (user_filesystem )
102
+ os .chdir (base_dir )
115
103
cli_inputs = ["2.5" ] + inputs
116
104
actual_args = get_args (cli_inputs )
117
105
with pytest .raises (ValueError , match = msg [0 ]):
118
106
actual_args = set_input_lists (actual_args )
119
107
120
108
121
- # Pass files to loadData and use it to check if file is valid or not
122
-
123
-
124
109
params1 = [
125
110
([], ["." ]),
126
111
(["--output-directory" , "." ], ["." ]),
0 commit comments