setuptools not present issue deprecating gentest

This commit is contained in:
Maarten
2015-07-25 13:50:40 +02:00
parent ae28e4ba0f
commit e3d60024aa
2 changed files with 16 additions and 8 deletions

View File

@@ -27,13 +27,17 @@ def test_gen(testdir, anypython, standalone):
pytest.skip("genscript called from python2.7 cannot work "
"earlier python versions")
result = standalone.run(anypython, testdir, '--version')
assert result.ret == 0
result.stderr.fnmatch_lines([
"*imported from*mypytest*"
])
p = testdir.makepyfile("def test_func(): assert 0")
result = standalone.run(anypython, testdir, p)
assert result.ret != 0
if result.ret == 2:
result.stderr.fnmatch_lines(["*ERROR: setuptools not installed*"])
elif result.ret == 0:
result.stderr.fnmatch_lines([
"*imported from*mypytest*"
])
p = testdir.makepyfile("def test_func(): assert 0")
result = standalone.run(anypython, testdir, p)
assert result.ret != 0
else:
pytest.fail("Unexpected return code")
def test_freeze_includes():