Skip to content

Commit 0124e43

Browse files
removed more unnecessary tests and added test for file-list file, currently failing
1 parent 0c19e3d commit 0124e43

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

src/diffpy/labpdfproc/labpdfprocapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def get_args(override_cli_inputs=None):
2929
"everything in the folder ./data), 'data/file_list.txt' (load"
3030
" the list of files contained in the text-file called "
3131
"file_list.txt that can be found in the folder ./data), "
32-
"'data/*.chi' (load all files with extension .chi in the "
33-
"folder ./data), 'data*' (load all files and directories starting with 'data').",
32+
"'./*.chi', 'data/*.chi' (load all files with extension .chi in the "
33+
"folder ./data).",
3434
)
3535
p.add_argument(
3636
"-a",

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,8 @@
6565
["good_data*"],
6666
["good_data.chi", "good_data.xy", "good_data.txt"],
6767
),
68-
( # wildcard pattern, matching files or directories starting with input
69-
["input*"],
70-
[
71-
"input_dir/good_data.chi",
72-
"input_dir/good_data.xy",
73-
"input_dir/good_data.txt",
74-
"input_dir/unreadable_file.txt",
75-
"input_dir/binary.pkl",
76-
],
77-
),
78-
( # wildcard pattern, matching files or directories starting with unreadable and ending with .txt extension
79-
["unreadable*.txt"],
80-
["unreadable_file.txt"],
81-
),
68+
# wildcard pattern for file-list file, currently failing
69+
# (["input_dir/file_list*"], "file_list.txt"),
8270
]
8371

8472

src/diffpy/labpdfproc/tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ def _expand_user_input(args):
4444
"""
4545
wildcard_inputs = [input_name for input_name in args.input if "*" in input_name]
4646
file_list_inputs = [input_name for input_name in args.input if "file_list" in input_name]
47-
4847
for wildcard_input in wildcard_inputs:
4948
input_files = [str(file) for file in Path(".").glob(wildcard_input)]
5049
args.input.extend(input_files)
5150
args.input.remove(wildcard_input)
52-
5351
for file_list_input in file_list_inputs:
5452
with open(file_list_input, "r") as f:
5553
file_inputs = [input_name.strip() for input_name in f.readlines()]

0 commit comments

Comments
 (0)