drop usage of py.path.local calls
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
from typing import Sequence
|
||||
from typing import Union
|
||||
|
||||
import py.path
|
||||
|
||||
import pytest
|
||||
from _pytest._code.code import ExceptionChainRepr
|
||||
from _pytest._code.code import ExceptionRepr
|
||||
from _pytest.compat import legacy_path
|
||||
from _pytest.config import Config
|
||||
from _pytest.pytester import Pytester
|
||||
from _pytest.reports import CollectReport
|
||||
@@ -237,7 +236,7 @@ class TestReportSerialization:
|
||||
reports = reprec.getreports("pytest_runtest_logreport")
|
||||
assert len(reports) == 3
|
||||
test_a_call = reports[1]
|
||||
test_a_call.path1 = py.path.local(pytester.path) # type: ignore[attr-defined]
|
||||
test_a_call.path1 = legacy_path(pytester.path) # type: ignore[attr-defined]
|
||||
test_a_call.path2 = pytester.path # type: ignore[attr-defined]
|
||||
data = test_a_call._to_json()
|
||||
assert data["path1"] == str(pytester.path)
|
||||
|
||||
Reference in New Issue
Block a user