We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14cbbc3 commit 1082b8cCopy full SHA for 1082b8c
unit_tests/test_xunit.py
@@ -81,9 +81,18 @@ def test_tee_has_error_and_encoding_attributes(self):
81
self.assertTrue(hasattr(tee, 'errors'))
82
83
def test_tee_works_with_distutils_log(self):
84
- from distutils.log import Log, DEBUG
+ try:
85
+ from distutils.log import Log, DEBUG
86
+ except ImportError:
87
+ raise SkipTest("distutils.log not available; skipping")
88
+
89
l = Log(DEBUG)
- l.warn('Test')
90
91
+ l.warn('Test')
92
+ except Exception, e:
93
+ self.fail(
94
+ "Exception raised while writing to distutils.log: %s" % (e,))
95
96
97
class TestXMLOutputWithXML(unittest.TestCase):
98
0 commit comments