(self, parser: parseopt.Parser, tmp_path: Path)
| 138 | # Can be removed once Python<3.12 support is dropped. |
| 139 | @pytest.mark.filterwarnings("ignore:'encoding' argument not specified") |
| 140 | def test_parse_from_file(self, parser: parseopt.Parser, tmp_path: Path) -> None: |
| 141 | tests = [".", "some.py::Test::test_method[param0]", "other/test_file.py"] |
| 142 | args_file = tmp_path / "tests.txt" |
| 143 | args_file.write_text("\n".join(tests), encoding="utf-8") |
| 144 | args = parser.parse([f"@{args_file.absolute()}"]) |
| 145 | assert getattr(args, parseopt.FILE_OR_DIR) == tests |
| 146 | |
| 147 | def test_parse_known_args(self, parser: parseopt.Parser) -> None: |
| 148 | parser.parse_known_args([Path(".")]) |
nothing calls this directly
no test coverage detected