merged in flub/pytest (PR #195)
This commit is contained in:
commit
2e1c36bbb6
|
@ -8,6 +8,9 @@ NEXT
|
||||||
- fixed issue453: assertion rewriting issue with __repr__ containing
|
- fixed issue453: assertion rewriting issue with __repr__ containing
|
||||||
"\n{", "\n}" and "\n~".
|
"\n{", "\n}" and "\n~".
|
||||||
|
|
||||||
|
- fix issue560: correctly display code if an "else:" or "finally:" is
|
||||||
|
followed by statements on the same line.
|
||||||
|
|
||||||
- Fix example in monkeypatch documentation, thanks t-8ch.
|
- Fix example in monkeypatch documentation, thanks t-8ch.
|
||||||
|
|
||||||
- fix issue572: correct tmpdir doc example for python3.
|
- fix issue572: correct tmpdir doc example for python3.
|
||||||
|
|
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,14 @@ 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()
|
||||||
|
result.stdout.fnmatch_lines(['*else: assert False*'])
|
||||||
|
|
Loading…
Reference in New Issue