Add Item.runtest stub implementation

Every Item must implement this method (called on all items collected in
a session). Add a stub for typing and clarity.
This commit is contained in:
Ran Benita
2020-02-15 16:51:09 +02:00
parent 7fc9d4c976
commit a7a1686433
3 changed files with 6 additions and 3 deletions

View File

@@ -1474,7 +1474,7 @@ class Function(PyobjMixin, nodes.Item):
warnings.warn(FUNCARGNAMES, stacklevel=2)
return self.fixturenames
def runtest(self):
def runtest(self) -> None:
""" execute the underlying test function. """
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
@@ -1519,7 +1519,7 @@ class FunctionDefinition(Function):
crappy metafunc hack
"""
def runtest(self):
def runtest(self) -> None:
raise RuntimeError("function definitions are not supposed to be used")
setup = runtest