diff options
author | Georg Brandl <georg@python.org> | 2022-02-08 08:13:36 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2022-02-08 08:13:36 +0100 |
commit | f9c7fb6edf7f46cc8f2b4bb91c59c341c846545f (patch) | |
tree | 481487f6d034ed8f581de3ef2595111cadd6bf67 | |
parent | da799d14818ed538bf937684a19ce779ddde9446 (diff) | |
download | pygments-git-f9c7fb6edf7f46cc8f2b4bb91c59c341c846545f.tar.gz |
tests: fix pytest 8 deprecation
-rw-r--r-- | tests/examplefiles/conftest.py | 3 | ||||
-rw-r--r-- | tests/snippets/conftest.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/examplefiles/conftest.py b/tests/examplefiles/conftest.py index 93532111..a1aa0ef7 100644 --- a/tests/examplefiles/conftest.py +++ b/tests/examplefiles/conftest.py @@ -16,6 +16,7 @@ :license: BSD, see LICENSE for details. """ +import pathlib import pytest from tests.conftest import LexerSeparateTestItem @@ -23,7 +24,7 @@ from tests.conftest import LexerSeparateTestItem def pytest_collect_file(parent, path): if path.ext != '.output' and path.basename != 'conftest.py': - return LexerTestFile.from_parent(parent, fspath=path) + return LexerTestFile.from_parent(parent, path=pathlib.Path(path)) class LexerTestFile(pytest.File): diff --git a/tests/snippets/conftest.py b/tests/snippets/conftest.py index b5ee33c6..02e62555 100644 --- a/tests/snippets/conftest.py +++ b/tests/snippets/conftest.py @@ -16,6 +16,7 @@ :license: BSD, see LICENSE for details. """ +import pathlib import pytest from tests.conftest import LexerInlineTestItem @@ -23,7 +24,7 @@ from tests.conftest import LexerInlineTestItem def pytest_collect_file(parent, path): if path.ext == '.txt': - return LexerTestFile.from_parent(parent, fspath=path) + return LexerTestFile.from_parent(parent, path=pathlib.Path(path)) class LexerTestFile(pytest.File): |