streamline pytester API majorly:
- integrate conftest into pytester plugin - introduce runpytest() to either call runpytest_inline (default) or runpytest_subprocess (python -m pytest) - move testdir.inline_runsource1 to pdb tests - strike some unneccessary methods. - a new section "writing plugins" and some better pytester docs --HG-- branch : testrefactor
This commit is contained in:
@@ -468,12 +468,12 @@ def test_rewritten():
|
||||
tmp = "--basetemp=%s" % p
|
||||
monkeypatch.setenv("PYTHONOPTIMIZE", "2")
|
||||
monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
||||
assert testdir.runpybin("py.test", tmp).ret == 0
|
||||
assert testdir.runpytest_subprocess(tmp).ret == 0
|
||||
tagged = "test_pyc_vs_pyo." + PYTEST_TAG
|
||||
assert tagged + ".pyo" in os.listdir("__pycache__")
|
||||
monkeypatch.undo()
|
||||
monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
|
||||
assert testdir.runpybin("py.test", tmp).ret == 1
|
||||
assert testdir.runpytest_subprocess(tmp).ret == 1
|
||||
assert tagged + ".pyc" in os.listdir("__pycache__")
|
||||
|
||||
def test_package(self, testdir):
|
||||
|
||||
Reference in New Issue
Block a user