Added an additional test for import errors in --tx mode.

This commit is contained in:
Jonathan Hunt
2013-04-28 16:06:41 -07:00
parent 10c9c34c75
commit 6c1587a157

View File

@@ -60,6 +60,18 @@ class TestDistribution:
"*1 skipped*", "*1 skipped*",
]) ])
def test_manytests_to_one_import_error(self, testdir):
p1 = testdir.makepyfile("""
import __import_of_missing_module
def test_import():
pass
""")
result = testdir.runpytest(p1, '--tx=popen', '--tx=popen')
assert result.ret == 1
result.stdout.fnmatch_lines([
"E ImportError: No module named __import_of_missing_module",
])
def test_manytests_to_one_popen(self, testdir): def test_manytests_to_one_popen(self, testdir):
p1 = testdir.makepyfile(""" p1 = testdir.makepyfile("""
import py import py