1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/f58d81b9d2c2/ Changeset: f58d81b9d2c2 User: hpk42 Date: 2014-09-22 11:34:50+00:00 Summary: Merged in davidszotten/pytest/dontreadfrominput-encoding (pull request #205)
add `encoding` attr to DontReadFromInput Affected #: 2 files diff -r 81d45151f455fd7ca06501bb2a895ac0feb54bd2 -r f58d81b9d2c2e382ecdfcb09677f742f37a5840d _pytest/capture.py --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -428,6 +428,9 @@ because in automated test runs it is better to crash than hang indefinitely. """ + + encoding = None + def read(self, *args): raise IOError("reading from stdin while output is captured") readline = read diff -r 81d45151f455fd7ca06501bb2a895ac0feb54bd2 -r f58d81b9d2c2e382ecdfcb09677f742f37a5840d testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -1025,6 +1025,18 @@ reprec.assertoutcome(passed=1) +def test_dontreadfrominput_has_encoding(testdir): + testdir.makepyfile(""" + import sys + def test_capattr(): + # should not raise AttributeError + assert sys.stdout.encoding + assert sys.stderr.encoding + """) + reprec = testdir.inline_run() + reprec.assertoutcome(passed=1) + + def test_pickling_and_unpickling_enocded_file(): # See https://bitbucket.org/hpk42/pytest/pull-request/194 # pickle.loads() raises infinite recursion if 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. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit