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