- refine lsof checking

- make runpytest() create an inline testing process instead of
  a subprocess one

--HG--
branch : testrefactor
This commit is contained in:
holger krekel
2015-04-28 11:54:46 +02:00
parent d3e363b97a
commit a8afba054a
18 changed files with 137 additions and 116 deletions

View File

@@ -453,7 +453,7 @@ def test_rewritten():
assert not os.path.exists(__cached__)
assert not os.path.exists(os.path.dirname(__cached__))""")
monkeypatch.setenv("PYTHONDONTWRITEBYTECODE", "1")
assert testdir.runpytest().ret == 0
assert testdir.runpytest_subprocess().ret == 0
@pytest.mark.skipif('"__pypy__" in sys.modules')
def test_pyc_vs_pyo(self, testdir, monkeypatch):
@@ -615,10 +615,8 @@ class TestAssertionRewriteHookDetails(object):
testdir.makepyfile(**contents)
testdir.maketxtfile(**{'testpkg/resource': "Load me please."})
result = testdir.runpytest()
result.stdout.fnmatch_lines([
'* 1 passed*',
])
result = testdir.runpytest_subprocess()
result.assert_outcomes(passed=1)
def test_read_pyc(self, tmpdir):
"""