Fix type errors after adding types to the py dependency

This commit is contained in:
Ran Benita
2020-01-18 14:59:24 +02:00
parent d347a30656
commit 930a158a6a
7 changed files with 25 additions and 18 deletions

View File

@@ -1018,10 +1018,10 @@ class TestReportInfo:
def test_itemreport_reportinfo(self, testdir):
testdir.makeconftest(
"""
import pytest
import pytest, py
class MyFunction(pytest.Function):
def reportinfo(self):
return "ABCDE", 42, "custom"
return py.path.local("foo"), 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 == ("ABCDE", 42, "custom")
assert item.location == ("foo", 42, "custom")
def test_func_reportinfo(self, testdir):
item = testdir.getitem("def test_func(): pass")