2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/e11d9acd5482/ Changeset: e11d9acd5482 User: hpk42 Date: 2014-04-02 12:32:21 Summary: fix issue492: avoid leak in test_writeorg Affected #: 2 files
diff -r 19506411569322fe9d014c4563ffec867f3073c9 -r e11d9acd54826bd22d59337cbe50b5558d90cd38 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,8 @@ - improvements to pytest's own test-suite leakage detection, courtesy of PRs from Marc Abramowitz +- fix issue492: avoid leak in test_writeorg + 2.5.2 ----------------------------------- diff -r 19506411569322fe9d014c4563ffec867f3073c9 -r e11d9acd54826bd22d59337cbe50b5558d90cd38 testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -709,13 +709,11 @@ def test_writeorg(self, tmpfile): data1, data2 = tobytes("foo"), tobytes("bar") - try: - cap = capture.FDCapture(tmpfile.fileno()) - cap.start() - tmpfile.write(data1) - cap.writeorg(data2) - finally: - tmpfile.close() + cap = capture.FDCapture(tmpfile.fileno()) + cap.start() + tmpfile.write(data1) + tmpfile.flush() + cap.writeorg(data2) scap = cap.snap() cap.done() assert scap == totext(data1) https://bitbucket.org/hpk42/pytest/commits/565d840023be/ Changeset: 565d840023be User: hpk42 Date: 2014-04-02 12:32:30 Summary: fix issue492: avoid leak in test_writeorg. Thanks Marc Abramowitz. Affected #: 1 file diff -r e11d9acd54826bd22d59337cbe50b5558d90cd38 -r 565d840023be5a4c59135be1a11b7bca2a97b663 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -40,7 +40,7 @@ - improvements to pytest's own test-suite leakage detection, courtesy of PRs from Marc Abramowitz -- fix issue492: avoid leak in test_writeorg +- fix issue492: avoid leak in test_writeorg. Thanks Marc Abramowitz. 2.5.2 ----------------------------------- 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