|
6 | 6 | from _pytest.config.argparsing import Parser |
7 | 7 |
|
8 | 8 | from pytest_mypy import utils |
| 9 | +from pytest_mypy.utils import string_to_bool |
9 | 10 |
|
10 | 11 |
|
11 | 12 | class File: |
@@ -78,16 +79,18 @@ def collect(self): |
78 | 79 | expected_output_lines = raw_test.get('out', '').split('\n') |
79 | 80 | additional_mypy_config = raw_test.get('mypy_config', '') |
80 | 81 |
|
81 | | - yield YamlTestItem(name=test_name, |
82 | | - collector=self, |
83 | | - config=self.config, |
84 | | - files=test_files, |
85 | | - starting_lineno=starting_lineno, |
86 | | - environment_variables=extra_environment_variables, |
87 | | - disable_cache=disable_cache, |
88 | | - expected_output_lines=output_from_comments + expected_output_lines, |
89 | | - parsed_test_data=raw_test, |
90 | | - mypy_config=additional_mypy_config) |
| 82 | + skip = string_to_bool(str(raw_test.get('skip', 'False'))) |
| 83 | + if not skip: |
| 84 | + yield YamlTestItem(name=test_name, |
| 85 | + collector=self, |
| 86 | + config=self.config, |
| 87 | + files=test_files, |
| 88 | + starting_lineno=starting_lineno, |
| 89 | + environment_variables=extra_environment_variables, |
| 90 | + disable_cache=disable_cache, |
| 91 | + expected_output_lines=output_from_comments + expected_output_lines, |
| 92 | + parsed_test_data=raw_test, |
| 93 | + mypy_config=additional_mypy_config) |
91 | 94 |
|
92 | 95 |
|
93 | 96 | def pytest_collect_file(path, parent): |
|
0 commit comments