Remove Testdir.run_example as recommended
This commit is contained in:
parent
6e57d123bb
commit
57b0c60cb4
|
@ -669,11 +669,6 @@ class Testdir(object):
|
|||
else:
|
||||
raise LookupError("example is not found as a file or directory")
|
||||
|
||||
def run_example(self, name=None, *pytest_args):
|
||||
"""Runs the given example and returns the results of the run"""
|
||||
p = self.copy_example(name)
|
||||
return self.runpytest(p, *pytest_args)
|
||||
|
||||
Session = Session
|
||||
|
||||
def getnode(self, config, arg):
|
||||
|
|
|
@ -5,7 +5,8 @@ import pytest
|
|||
|
||||
|
||||
def test_tmpdir_fixture(testdir):
|
||||
results = testdir.run_example("tmpdir/tmpdir_fixture.py")
|
||||
p = testdir.copy_example("tmpdir/tmpdir_fixture.py")
|
||||
results = testdir.runpytest(p)
|
||||
results.stdout.fnmatch_lines("*1 passed*")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue