Skip to content

Commit 7341d2a

Browse files
committed
Update test_cli.py
Somehow subprocess was missing lines to turn the command line into a list of strings.
1 parent b3ea7e8 commit 7341d2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ def test_extract_metadata_command(from_path, to_path, key, to_format, no_header,
503503

504504
def test_extract_metadata_stdout():
505505
command = "python -m mwtab extract metadata tests/example_data/mwtab_files/ - SUBJECT_TYPE --to-format=json"
506+
command = command.split(" ")
506507
subp = subprocess.run(command, capture_output=True, encoding="UTF-8")
507508
assert subp.returncode == 0
508509
assert "{'SUBJECT_TYPE': {'Human'}}" == subp.stdout[:-1]
@@ -587,6 +588,7 @@ def test_extract_metabolites_command(from_path, to_path, key, value, to_format,
587588

588589
def test_extract_metabolites_stdout():
589590
command = "python -m mwtab extract metabolites tests/example_data/mwtab_files/ - SU:SUBJECT_TYPE Human --to-format=json"
591+
command = command.split(" ")
590592
subp = subprocess.run(command, capture_output=True, encoding="UTF-8")
591593
assert subp.returncode == 0
592594
assert '{\n "17-hydroxypregnenolone": {\n "ST000122": {' in subp.stdout

0 commit comments

Comments
 (0)