Depend on newer version of py
This fixes issue560, a test for which is included here as well.
This commit is contained in:
parent
9232b88df3
commit
98dcd764bc
|
@ -3,6 +3,9 @@ NEXT
|
||||||
|
|
||||||
- fixed issue561: adapt autouse fixture example for python3.
|
- fixed issue561: adapt autouse fixture example for python3.
|
||||||
|
|
||||||
|
- fix issue560: correctly display code if an "else:" or "finally:" is
|
||||||
|
followed by statements on the same line.
|
||||||
|
|
||||||
2.6.1
|
2.6.1
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -17,7 +17,7 @@ long_description = open('README.rst').read()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
install_requires = ['py>=1.4.22']
|
install_requires = ['py>=1.4.24.dev1']
|
||||||
if sys.version_info < (2, 7) or (3,) <= sys.version_info < (3, 2):
|
if sys.version_info < (2, 7) or (3,) <= sys.version_info < (3, 2):
|
||||||
install_requires.append('argparse')
|
install_requires.append('argparse')
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
|
|
|
@ -505,7 +505,6 @@ def test_unicode_in_longrepr(testdir):
|
||||||
assert "UnicodeEncodeError" not in result.stderr.str()
|
assert "UnicodeEncodeError" not in result.stderr.str()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_failure_in_setup(testdir):
|
def test_failure_in_setup(testdir):
|
||||||
testdir.makepyfile("""
|
testdir.makepyfile("""
|
||||||
def setup_module():
|
def setup_module():
|
||||||
|
@ -515,3 +514,13 @@ def test_failure_in_setup(testdir):
|
||||||
""")
|
""")
|
||||||
result = testdir.runpytest("--tb=line")
|
result = testdir.runpytest("--tb=line")
|
||||||
assert "def setup_module" not in result.stdout.str()
|
assert "def setup_module" not in result.stdout.str()
|
||||||
|
|
||||||
|
|
||||||
|
def test_makereport_getsource(testdir):
|
||||||
|
testdir.makepyfile("""
|
||||||
|
def test_foo():
|
||||||
|
if False: pass
|
||||||
|
else: assert False
|
||||||
|
""")
|
||||||
|
result = testdir.runpytest()
|
||||||
|
assert 'INTERNALERROR' not in result.stdout.str()
|
||||||
|
|
Loading…
Reference in New Issue