diff options
| author | Jonathan Lange <jml@canonical.com> | 2012-10-19 15:29:59 +0100 |
|---|---|---|
| committer | Jonathan Lange <jml@canonical.com> | 2012-10-19 15:29:59 +0100 |
| commit | cfe413e833c32f79db2f9c36b41e0c3e2edfc1ca (patch) | |
| tree | b3e88d9194d5292c3888393248e46214724ca35f /testtools/tests/test_testresult.py | |
| parent | 75fe2bdc416510965dbf94eda0f5a9f7b533745d (diff) | |
| download | testtools-cfe413e833c32f79db2f9c36b41e0c3e2edfc1ca.tar.gz | |
Address mgz's comment.
Diffstat (limited to 'testtools/tests/test_testresult.py')
| -rw-r--r-- | testtools/tests/test_testresult.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py index 2703085..c8567f7 100644 --- a/testtools/tests/test_testresult.py +++ b/testtools/tests/test_testresult.py @@ -1692,11 +1692,9 @@ class TestNonAsciiResults(TestCase): finally: f.close() textoutput = self._run_external_case() - if sys.version_info > (3, 3): - error = 'TypeError' - else: - error = 'SyntaxError' - self.assertIn(self._as_output("\n%s: " % (error,)), textoutput) + matches_error = MatchesAny( + Contains('\nTypeError: '), Contains('\nSyntaxError: ')) + self.assertThat(textoutput, matches_error) def test_syntax_error_line_iso_8859_1(self): """Syntax error on a latin-1 line shows the line decoded""" |
