diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-17 12:06:44 +0200 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-17 12:06:44 +0200 |
| commit | 444b8a182b5a690fdb3e4d28ca8a61de27949178 (patch) | |
| tree | ba0f608b985a89c2a4baee4bc0e07cb461443092 /Lib/test/test_exceptions.py | |
| parent | f31fbd0341e56d6d7f729688befbc0edc9379802 (diff) | |
| parent | aa3eafec628637ab0369d1268934eb6201cf32d1 (diff) | |
| download | cpython-444b8a182b5a690fdb3e4d28ca8a61de27949178.tar.gz | |
Merge rephrasing with 3.3.
Diffstat (limited to 'Lib/test/test_exceptions.py')
| -rw-r--r-- | Lib/test/test_exceptions.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 1ad7f97b74..e62ed3c93b 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -8,8 +8,8 @@ import weakref import errno from test.support import (TESTFN, captured_output, check_impl_detail, - cpython_only, gc_collect, run_unittest, no_tracing, - unlink) + check_warnings, cpython_only, gc_collect, run_unittest, + no_tracing, unlink) class NaiveException(Exception): def __init__(self, x): @@ -947,9 +947,10 @@ class ImportErrorTests(unittest.TestCase): def test_non_str_argument(self): # Issue #15778 - arg = b'abc' - exc = ImportError(arg) - self.assertEqual(str(arg), str(exc)) + with check_warnings(('', BytesWarning), quiet=True): + arg = b'abc' + exc = ImportError(arg) + self.assertEqual(str(arg), str(exc)) def test_main(): |
