Fix flakes
This commit is contained in:
parent
0f52856f99
commit
74bc50e97c
|
@ -1,7 +1,7 @@
|
||||||
import py
|
import py
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from _pytest.tmpdir import tmpdir, TempdirFactory
|
from _pytest.tmpdir import tmpdir
|
||||||
|
|
||||||
def test_funcarg(testdir):
|
def test_funcarg(testdir):
|
||||||
testdir.makepyfile("""
|
testdir.makepyfile("""
|
||||||
|
@ -10,6 +10,7 @@ def test_funcarg(testdir):
|
||||||
metafunc.addcall(id='b')
|
metafunc.addcall(id='b')
|
||||||
def test_func(tmpdir): pass
|
def test_func(tmpdir): pass
|
||||||
""")
|
""")
|
||||||
|
from _pytest.tmpdir import TempdirFactory
|
||||||
reprec = testdir.inline_run()
|
reprec = testdir.inline_run()
|
||||||
calls = reprec.getcalls("pytest_runtest_setup")
|
calls = reprec.getcalls("pytest_runtest_setup")
|
||||||
item = calls[0].item
|
item = calls[0].item
|
||||||
|
@ -35,6 +36,7 @@ def test_ensuretemp(recwarn):
|
||||||
|
|
||||||
class TestTempdirHandler:
|
class TestTempdirHandler:
|
||||||
def test_mktemp(self, testdir):
|
def test_mktemp(self, testdir):
|
||||||
|
from _pytest.tmpdir import TempdirFactory
|
||||||
config = testdir.parseconfig()
|
config = testdir.parseconfig()
|
||||||
config.option.basetemp = testdir.mkdir("hello")
|
config.option.basetemp = testdir.mkdir("hello")
|
||||||
t = TempdirFactory(config)
|
t = TempdirFactory(config)
|
||||||
|
|
Loading…
Reference in New Issue