Skip to content

Commit d565670

Browse files
committed
--show-tags: sort the output & add a test
1 parent 7e919f6 commit d565670

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

cwltest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def main() -> int:
165165
for t in tests:
166166
ts = t.get("tags", [])
167167
alltags |= set(ts)
168-
for tag in alltags:
168+
for tag in sorted(alltags):
169169
print(tag)
170170
return 0
171171

tests/test_categories.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,23 @@ def test_category_in_junit_xml(tmp_path: Path) -> None:
9393
Element, cast(Element, root.find("testsuite")).find("testcase")
9494
).attrib["class"]
9595
assert category == "js, init_work_dir"
96+
97+
98+
def test_list_all_tags() -> None:
99+
args = [
100+
"--test",
101+
schema_salad.ref_resolver.file_uri(
102+
get_data("tests/test-data/conformance_test_v1.2.cwltest.yaml")
103+
),
104+
"--show-tags",
105+
]
106+
error_code, stdout, stderr = run_with_mock_cwl_runner(args)
107+
assert error_code == 0, stderr
108+
assert (
109+
stdout
110+
== """command_line_tool
111+
expression_tool
112+
inline_javascript
113+
required
114+
"""
115+
)

0 commit comments

Comments
 (0)