- 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

@@ -626,10 +626,8 @@ def test_setup_only_available_in_subdir(testdir):
"""))
sub1.join("test_in_sub1.py").write("def test_1(): pass")
sub2.join("test_in_sub2.py").write("def test_2(): pass")
result = testdir.inline_runpytest("-v", "-s")
result.stdout.fnmatch_lines([
"*2 passed*"
])
result = testdir.runpytest("-v", "-s")
result.assert_outcomes(passed=2)
def test_modulecol_roundtrip(testdir):
modcol = testdir.getmodulecol("pass", withinit=True)

View File

@@ -99,10 +99,8 @@ class TestFillFixtures:
sub1.join("test_in_sub1.py").write("def test_1(arg1): pass")
sub2.join("test_in_sub2.py").write("def test_2(arg2): pass")
result = testdir.inline_runpytest("-v")
result.stdout.fnmatch_lines([
"*2 passed*"
])
result = testdir.runpytest("-v")
result.assert_outcomes(passed=2)
def test_extend_fixture_module_class(self, testdir):
testfile = testdir.makepyfile("""

View File

@@ -663,7 +663,7 @@ class TestMetafuncFunctional:
"""))
sub1.join("test_in_sub1.py").write("def test_1(): pass")
sub2.join("test_in_sub2.py").write("def test_2(): pass")
result = testdir.inline_runpytest("-v", "-s", sub1, sub2, sub1)
result = testdir.runpytest("-v", "-s", sub1, sub2, sub1)
result.assert_outcomes(passed=3)
def test_generate_same_function_names_issue403(self, testdir):