mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
Clean up some warnings in test suite output.
This commit is contained in:
parent
ba3e4a0bc0
commit
6d70870812
2 changed files with 6 additions and 5 deletions
|
|
@ -8,7 +8,7 @@
|
|||
import errno
|
||||
|
||||
from test.support import (TESTFN, unlink, run_unittest, captured_output,
|
||||
gc_collect, cpython_only, no_tracing)
|
||||
check_warnings, gc_collect, cpython_only, no_tracing)
|
||||
|
||||
class NaiveException(Exception):
|
||||
def __init__(self, x):
|
||||
|
|
@ -939,9 +939,10 @@ def test_attributes(self):
|
|||
|
||||
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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue