Merge pull request #7155 from kerizane/make_numbered_dir
This commit is contained in:
commit
80e5098408
1
AUTHORS
1
AUTHORS
|
@ -150,6 +150,7 @@ Karl O. Pinc
|
|||
Katarzyna Jachim
|
||||
Katarzyna Król
|
||||
Katerina Koukiou
|
||||
Keri Volans
|
||||
Kevin Cox
|
||||
Kevin J. Foley
|
||||
Kodi B. Arfer
|
||||
|
|
|
@ -35,6 +35,7 @@ from _pytest.main import Session
|
|||
from _pytest.monkeypatch import MonkeyPatch
|
||||
from _pytest.nodes import Collector
|
||||
from _pytest.nodes import Item
|
||||
from _pytest.pathlib import make_numbered_dir
|
||||
from _pytest.pathlib import Path
|
||||
from _pytest.python import Module
|
||||
from _pytest.reports import TestReport
|
||||
|
@ -1256,9 +1257,7 @@ class Testdir:
|
|||
Returns a :py:class:`RunResult`.
|
||||
"""
|
||||
__tracebackhide__ = True
|
||||
p = py.path.local.make_numbered_dir(
|
||||
prefix="runpytest-", keep=None, rootdir=self.tmpdir
|
||||
)
|
||||
p = make_numbered_dir(root=Path(self.tmpdir), prefix="runpytest-")
|
||||
args = ("--basetemp=%s" % p,) + args
|
||||
plugins = [x for x in self.plugins if isinstance(x, str)]
|
||||
if plugins:
|
||||
|
|
|
@ -10,8 +10,6 @@ import textwrap
|
|||
import zipfile
|
||||
from functools import partial
|
||||
|
||||
import py
|
||||
|
||||
import _pytest._code
|
||||
import pytest
|
||||
from _pytest.assertion import util
|
||||
|
@ -22,6 +20,7 @@ from _pytest.assertion.rewrite import PYC_TAIL
|
|||
from _pytest.assertion.rewrite import PYTEST_TAG
|
||||
from _pytest.assertion.rewrite import rewrite_asserts
|
||||
from _pytest.config import ExitCode
|
||||
from _pytest.pathlib import make_numbered_dir
|
||||
from _pytest.pathlib import Path
|
||||
|
||||
|
||||
|
@ -822,9 +821,7 @@ def test_rewritten():
|
|||
"hello"
|
||||
assert test_optimized.__doc__ is None"""
|
||||
)
|
||||
p = py.path.local.make_numbered_dir(
|
||||
prefix="runpytest-", keep=None, rootdir=testdir.tmpdir
|
||||
)
|
||||
p = make_numbered_dir(root=Path(testdir.tmpdir), prefix="runpytest-")
|
||||
tmp = "--basetemp=%s" % p
|
||||
monkeypatch.setenv("PYTHONOPTIMIZE", "2")
|
||||
monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
||||
|
|
Loading…
Reference in New Issue