|
4 | 4 | from io import StringIO
|
5 | 5 | from typing import Any, Dict, cast
|
6 | 6 |
|
7 |
| -from pytest import CaptureFixture |
8 | 7 | from ruamel.yaml.comments import CommentedMap, CommentedSeq
|
9 | 8 |
|
10 | 9 | import schema_salad.main
|
@@ -47,79 +46,65 @@ def test_self_validate() -> None:
|
47 | 46 | assert 0 == schema_salad.main.main(argsl=[path, path])
|
48 | 47 |
|
49 | 48 |
|
50 |
| -def test_print_rdf(capfdbinary: CaptureFixture[bytes]) -> None: |
| 49 | +def test_print_rdf() -> None: |
51 | 50 | """Test --print-rdf."""
|
52 | 51 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
53 | 52 | document_path = get_data("tests/test_real_cwl/bio-cwl-tools/bamtools_stats.cwl")
|
54 | 53 | assert schema_path and document_path
|
55 | 54 | assert 0 == schema_salad.main.main(
|
56 | 55 | argsl=["--print-rdf", schema_path, document_path]
|
57 | 56 | )
|
58 |
| - captured = capfdbinary.readouterr() |
59 |
| - assert captured.out |
60 | 57 |
|
61 | 58 |
|
62 |
| -def test_print_pre_schema(capfdbinary: CaptureFixture[bytes]) -> None: |
| 59 | +def test_print_pre_schema() -> None: |
63 | 60 | """Test --print-pre only schema."""
|
64 | 61 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
65 | 62 | assert schema_path
|
66 | 63 | assert 0 == schema_salad.main.main(argsl=["--print-pre", schema_path])
|
67 |
| - captured = capfdbinary.readouterr() |
68 |
| - assert captured.out |
69 | 64 |
|
70 | 65 |
|
71 |
| -def test_print_pre(capfdbinary: CaptureFixture[bytes]) -> None: |
| 66 | +def test_print_pre() -> None: |
72 | 67 | """Test --print-pre."""
|
73 | 68 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
74 | 69 | document_path = get_data("tests/test_real_cwl/bio-cwl-tools/bamtools_stats.cwl")
|
75 | 70 | assert schema_path and document_path
|
76 | 71 | assert 0 == schema_salad.main.main(
|
77 | 72 | argsl=["--print-pre", schema_path, document_path]
|
78 | 73 | )
|
79 |
| - captured = capfdbinary.readouterr() |
80 |
| - assert captured.out |
81 | 74 |
|
82 | 75 |
|
83 |
| -def test_print_schema_index(capfdbinary: CaptureFixture[bytes]) -> None: |
| 76 | +def test_print_schema_index() -> None: |
84 | 77 | """Test --print-index only with a schema."""
|
85 | 78 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
86 | 79 | assert schema_path
|
87 | 80 | assert 0 == schema_salad.main.main(argsl=["--print-index", schema_path])
|
88 |
| - captured = capfdbinary.readouterr() |
89 |
| - assert captured.out |
90 | 81 |
|
91 | 82 |
|
92 |
| -def test_print_index(capfdbinary: CaptureFixture[bytes]) -> None: |
| 83 | +def test_print_index() -> None: |
93 | 84 | """Test --print-index."""
|
94 | 85 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
95 | 86 | document_path = get_data("tests/test_real_cwl/bio-cwl-tools/bamtools_stats.cwl")
|
96 | 87 | assert schema_path and document_path
|
97 | 88 | assert 0 == schema_salad.main.main(
|
98 | 89 | argsl=["--print-index", schema_path, document_path]
|
99 | 90 | )
|
100 |
| - captured = capfdbinary.readouterr() |
101 |
| - assert captured.out |
102 | 91 |
|
103 | 92 |
|
104 |
| -def test_print_schema_metadata(capfdbinary: CaptureFixture[bytes]) -> None: |
| 93 | +def test_print_schema_metadata() -> None: |
105 | 94 | """Test --print-metadata only for a schema."""
|
106 | 95 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
107 | 96 | assert schema_path
|
108 | 97 | assert 0 == schema_salad.main.main(argsl=["--print-metadata", schema_path])
|
109 |
| - captured = capfdbinary.readouterr() |
110 |
| - assert captured.out |
111 | 98 |
|
112 | 99 |
|
113 |
| -def test_print_metadata(capfdbinary: CaptureFixture[bytes]) -> None: |
| 100 | +def test_print_metadata() -> None: |
114 | 101 | """Test --print-metadata."""
|
115 | 102 | schema_path = get_data("tests/test_schema/CommonWorkflowLanguage.yml")
|
116 | 103 | document_path = get_data("tests/test_real_cwl/bio-cwl-tools/bamtools_stats.cwl")
|
117 | 104 | assert schema_path and document_path
|
118 | 105 | assert 0 == schema_salad.main.main(
|
119 | 106 | argsl=["--print-metadata", schema_path, document_path]
|
120 | 107 | )
|
121 |
| - captured = capfdbinary.readouterr() |
122 |
| - assert captured.out |
123 | 108 |
|
124 | 109 |
|
125 | 110 | def test_schema_salad_doc_oneline_doc() -> None:
|
|
0 commit comments