From fcc97b251e8c64e9fa92c9e5d1a2e85f10c0740e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 30 Mar 2017 06:51:27 -0400 Subject: Use new show_stderr flag so we can see errors printed to stderr during failing tests. --- tests/coveragetest.py | 3 +++ tests/test_plugins.py | 1 - tox.ini | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 37e0937..28ee92e 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -72,6 +72,9 @@ class CoverageTest( # Tell newer unittest implementations to print long helpful messages. longMessage = True + # Let stderr go to stderr, pytest will capture it for us. + show_stderr = True + def setUp(self): super(CoverageTest, self).setUp() diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 0edfebe..cb81229 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -558,7 +558,6 @@ class BadPluginTest(FileTracerTest): self.run_plugin(module_name) stderr = self.stderr() - print(stderr) # for diagnosing test failures. if our_error: errors = stderr.count("# Oh noes!") diff --git a/tox.ini b/tox.ini index ae0cfac..7d6abc8 100644 --- a/tox.ini +++ b/tox.ini @@ -14,8 +14,8 @@ deps = pip==9.0.1 mock==2.0.0 PyContracts==1.7.15 - unittest-mixins==1.2.1 - #-egit+/Users/ned/unittest_mixins#egg=unittest-mixins==0.0 + unittest-mixins==1.3 + #-e/Users/ned/unittest_mixins py26: unittest2==1.1.0 py{27,33,34,35,36}: gevent==1.2.1 py{26,27,33,34,35,36}: eventlet==0.20.1 -- cgit v1.2.1