Revert "Fix type errors after adding types to the py dependency"

This reverts commit 930a158a6a.

Regression test from Bruno Oliveira.
This commit is contained in:
Ran Benita
2020-01-20 23:08:09 +02:00
parent ddfa41b5a7
commit fb99b5c66e
8 changed files with 32 additions and 25 deletions

View File

@@ -1018,10 +1018,10 @@ class TestReportInfo:
def test_itemreport_reportinfo(self, testdir):
testdir.makeconftest(
"""
import pytest, py
import pytest
class MyFunction(pytest.Function):
def reportinfo(self):
return py.path.local("foo"), 42, "custom"
return "ABCDE", 42, "custom"
def pytest_pycollect_makeitem(collector, name, obj):
if name == "test_func":
return MyFunction(name, parent=collector)
@@ -1029,7 +1029,7 @@ class TestReportInfo:
)
item = testdir.getitem("def test_func(): pass")
item.config.pluginmanager.getplugin("runner")
assert item.location == ("foo", 42, "custom")
assert item.location == ("ABCDE", 42, "custom")
def test_func_reportinfo(self, testdir):
item = testdir.getitem("def test_func(): pass")