diff --git a/doc/en/example/nonpython/conftest.py b/doc/en/example/nonpython/conftest.py index 8a32814edf8..3d58f5927c4 100644 --- a/doc/en/example/nonpython/conftest.py +++ b/doc/en/example/nonpython/conftest.py @@ -1,5 +1,6 @@ # content of conftest.py import pytest +from _pytest.compat import legacy_path def pytest_collect_file(parent, fspath): @@ -40,7 +41,7 @@ def repr_failure(self, excinfo): ) def reportinfo(self): - return self.fspath, 0, f"usecase: {self.name}" + return legacy_path(self.path), 0, f"usecase: {self.name}" class YamlException(Exception):