diff options
author | John Szakmeister <john@szakmeister.net> | 2013-05-07 20:05:35 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2013-05-07 23:37:13 -0400 |
commit | 88cf773a56717dcd73b05edeb11ac35d3fc69536 (patch) | |
tree | 8d89e1b11a6aafd532da2e217de2c2288ca202f5 /functional_tests/test_xunit.py | |
parent | 8e6cb385c33ed621551dff55189b7697ad84f6fe (diff) | |
download | nose-88cf773a56717dcd73b05edeb11ac35d3fc69536.tar.gz |
Fix #680: xunit problem with unicode on stdout
It turns out we were trying to write unicode strings into a
cStringIO.StringIO object, which doesn't work well with unicode strings.
Instead, lets use StringIO.StringIO objects for capturing stdout and
stderr.
Diffstat (limited to 'functional_tests/test_xunit.py')
-rw-r--r-- | functional_tests/test_xunit.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/functional_tests/test_xunit.py b/functional_tests/test_xunit.py index d137513..f124c6a 100644 --- a/functional_tests/test_xunit.py +++ b/functional_tests/test_xunit.py @@ -76,3 +76,18 @@ class TestIssue279(PluginTester, unittest.TestCase): print result assert 'tests="1" errors="1" failures="0" skip="0"' in result assert "Exception: I would prefer not to" in result + + +class TestIssue680(PluginTester, unittest.TestCase): + activate = '--with-xunit' + args = ['-v','--xunit-file=%s' % xml_results_filename] + plugins = [Xunit(), Skip()] + suitepath = os.path.join(support, 'issue680') + + def runTest(self): + print str(self.output) + f = open(xml_results_filename,'r') + result = f.read() + f.close() + print result + assert 'tests="1" errors="0" failures="0" skip="0"' in result |