[Pytest-commit] commit/pytest: RonnyPfannschmidt: add a test for issue 14 that will xfail on python < 2.7

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Mar 25 08:53:21 CET 2013


1 new commit in pytest:

https://bitbucket.org/hpk42/pytest/commits/aed3e1770a96/
Changeset:   aed3e1770a96
User:        RonnyPfannschmidt
Date:        2013-03-25 08:53:08
Summary:     add a test for issue 14 that will xfail on python < 2.7
Affected #:  1 file

diff -r 14df4b5c4e82c3ac9f9f1189fa13e89907317d48 -r aed3e1770a969fc8cd43e8d5a4a1a90e9bb2058a testing/test_capture.py
--- a/testing/test_capture.py
+++ b/testing/test_capture.py
@@ -437,6 +437,18 @@
         ])
         assert result.ret == 2
 
+    @pytest.mark.xfail("sys.version_info < (2,7)")
+    @pytest.mark.issue14
+    def test_capture_and_logging(self, testdir):
+        p = testdir.makepyfile("""
+            import logging
+            def test_log(capsys):
+                logging.error('x')
+            """)
+        result = testdir.runpytest(p)
+        assert 'closed' not in result.stderr.str()
+
+
 def test_setup_failure_does_not_kill_capturing(testdir):
     sub1 = testdir.mkpydir("sub1")
     sub1.join("conftest.py").write(py.code.Source("""

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