Update testing/test_parseopt.py

Co-authored-by: Ran Benita <ran@unusedvar.com>
This commit is contained in:
Levon Saldamli 2024-03-08 13:12:52 +01:00
parent c0c810ccec
commit a413282876
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ class TestParser:
args = parser.parse([Path(".")])
assert getattr(args, parseopt.FILE_OR_DIR)[0] == "."
# Warning ignore because of:
# https://github.com/python/cpython/issues/85308
# Can be removed once Python<3.12 support is dropped.
@pytest.mark.filterwarnings("ignore:'encoding' argument not specified")
def test_parse_from_file(self, parser: parseopt.Parser, tmp_path: Path) -> None:
tests = [".", "some.py::Test::test_method[param0]", "other/test_file.py"]