summaryrefslogtreecommitdiff
path: root/testing/test_nose.py
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-04-28 11:54:53 +0200
committerholger krekel <holger@merlinux.eu>2015-04-28 11:54:53 +0200
commitdb5649ec6a8fcd9ef148b9f77797a22cb9f3cda1 (patch)
tree4c3b4e539dd75216b889218042b0f71d0e372fe6 /testing/test_nose.py
parenta8afba054a687b2735e9016a3a7335ebdf0846ea (diff)
downloadpytest-db5649ec6a8fcd9ef148b9f77797a22cb9f3cda1.tar.gz
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
Diffstat (limited to 'testing/test_nose.py')
-rw-r--r--testing/test_nose.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/testing/test_nose.py b/testing/test_nose.py
index b4b3d8836..58ccdfcb6 100644
--- a/testing/test_nose.py
+++ b/testing/test_nose.py
@@ -18,7 +18,7 @@ def test_nose_setup(testdir):
test_hello.setup = lambda: l.append(1)
test_hello.teardown = lambda: l.append(2)
""")
- result = testdir.inline_runpytest(p, '-p', 'nose')
+ result = testdir.runpytest_inprocess(p, '-p', 'nose')
result.assert_outcomes(passed=2)
@@ -63,7 +63,7 @@ def test_nose_setup_func(testdir):
assert l == [1,2]
""")
- result = testdir.inline_runpytest(p, '-p', 'nose')
+ result = testdir.runpytest_inprocess(p, '-p', 'nose')
result.assert_outcomes(passed=2)
@@ -85,7 +85,7 @@ def test_nose_setup_func_failure(testdir):
assert l == [1,2]
""")
- result = testdir.inline_runpytest(p, '-p', 'nose')
+ result = testdir.runpytest_inprocess(p, '-p', 'nose')
result.stdout.fnmatch_lines([
"*TypeError: <lambda>()*"
])
@@ -136,7 +136,7 @@ def test_nose_setup_partial(testdir):
test_hello.setup = my_setup_partial
test_hello.teardown = my_teardown_partial
""")
- result = testdir.inline_runpytest(p, '-p', 'nose')
+ result = testdir.runpytest_inprocess(p, '-p', 'nose')
result.stdout.fnmatch_lines([
"*2 passed*"
])
@@ -203,7 +203,7 @@ def test_nose_test_generator_fixtures(testdir):
#expect.append('setup')
eq_(self.called, expect)
""")
- result = testdir.inline_runpytest(p, '-p', 'nose')
+ result = testdir.runpytest_inprocess(p, '-p', 'nose')
result.stdout.fnmatch_lines([
"*10 passed*"
])
@@ -234,7 +234,7 @@ def test_module_level_setup(testdir):
assert items[2] == 2
assert 1 not in items
""")
- result = testdir.inline_runpytest('-p', 'nose')
+ result = testdir.runpytest_inprocess('-p', 'nose')
result.stdout.fnmatch_lines([
"*2 passed*",
])
@@ -256,7 +256,7 @@ def test_nose_style_setup_teardown(testdir):
def test_world():
assert l == [1]
""")
- result = testdir.inline_runpytest('-p', 'nose')
+ result = testdir.runpytest_inprocess('-p', 'nose')
result.stdout.fnmatch_lines([
"*2 passed*",
])
@@ -272,7 +272,7 @@ def test_nose_setup_ordering(testdir):
def test_first(self):
pass
""")
- result = testdir.inline_runpytest()
+ result = testdir.runpytest_inprocess()
result.stdout.fnmatch_lines([
"*1 passed*",
])
@@ -297,7 +297,7 @@ def test_apiwrapper_problem_issue260(testdir):
def test_fun(self):
pass
""")
- result = testdir.inline_runpytest()
+ result = testdir.runpytest_inprocess()
result.assert_outcomes(passed=1)
@pytest.mark.skipif("sys.version_info < (2,6)")
@@ -323,7 +323,7 @@ def test_setup_teardown_linking_issue265(testdir):
"""Undoes the setup."""
raise Exception("should not call teardown for skipped tests")
''')
- reprec = testdir.inline_runpytest()
+ reprec = testdir.runpytest_inprocess()
reprec.assert_outcomes(passed=1, skipped=1)
@@ -334,7 +334,7 @@ def test_SkipTest_during_collection(testdir):
def test_failing():
assert False
""")
- result = testdir.inline_runpytest(p)
+ result = testdir.runpytest_inprocess(p)
result.assert_outcomes(skipped=1)