[Pytest-commit] commit/pytest: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Sep 2 12:34:55 CEST 2014


3 new commits in pytest:

https://bitbucket.org/hpk42/pytest/commits/a44059eb0f24/
Changeset:   a44059eb0f24
User:        flub
Date:        2014-08-15 00:23:04
Summary:     Depend on newer version of py

This fixes issue560, a test for which is included here as well.
Affected #:  3 files

diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a44059eb0f240f025db7caefaa2cfa495e046956 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,9 @@
 
 - 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
 -----------------------------------
 

diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a44059eb0f240f025db7caefaa2cfa495e046956 setup.py
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@
 
 
 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):
         install_requires.append('argparse')
     if sys.platform == 'win32':

diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a44059eb0f240f025db7caefaa2cfa495e046956 testing/test_runner.py
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -505,7 +505,6 @@
     assert "UnicodeEncodeError" not in result.stderr.str()
 
 
-
 def test_failure_in_setup(testdir):
     testdir.makepyfile("""
         def setup_module():
@@ -515,3 +514,13 @@
     """)
     result = testdir.runpytest("--tb=line")
     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()


https://bitbucket.org/hpk42/pytest/commits/d36ab7dd537a/
Changeset:   d36ab7dd537a
User:        flub
Date:        2014-08-30 22:57:01
Summary:     Improve test by also matching expected output
Affected #:  1 file

diff -r a44059eb0f240f025db7caefaa2cfa495e046956 -r d36ab7dd537affc4f9ac93035a9aed50534c6a1d testing/test_runner.py
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -524,3 +524,4 @@
     """)
     result = testdir.runpytest()
     assert 'INTERNALERROR' not in result.stdout.str()
+    result.stdout.fnmatch_lines(['*else: assert False*'])


https://bitbucket.org/hpk42/pytest/commits/ec7b4b6844ff/
Changeset:   ec7b4b6844ff
User:        hpk42
Date:        2014-09-02 12:33:19
Summary:     merged in flub/pytest (PR #195)
Affected #:  3 files

diff -r dea7f0ad9330de94194522ea51bf686f2f8e0ef7 -r ec7b4b6844ff41b31bea9fd772562117de699d1d CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,9 @@
 - fixed issue453: assertion rewriting issue with __repr__ containing
   "\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 issue572: correct tmpdir doc example for python3.

diff -r dea7f0ad9330de94194522ea51bf686f2f8e0ef7 -r ec7b4b6844ff41b31bea9fd772562117de699d1d setup.py
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@
 
 
 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):
         install_requires.append('argparse')
     if sys.platform == 'win32':

diff -r dea7f0ad9330de94194522ea51bf686f2f8e0ef7 -r ec7b4b6844ff41b31bea9fd772562117de699d1d testing/test_runner.py
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -505,7 +505,6 @@
     assert "UnicodeEncodeError" not in result.stderr.str()
 
 
-
 def test_failure_in_setup(testdir):
     testdir.makepyfile("""
         def setup_module():
@@ -515,3 +514,14 @@
     """)
     result = testdir.runpytest("--tb=line")
     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*'])

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the pytest-commit mailing list