diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-08-07 21:55:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 21:55:35 (GMT) |
commit | fcce8c649a14f7a81fae82f9f203bb5b5ee0c205 (patch) | |
tree | d78cff6f9be7c2af7d46feb1c0837636081c05e4 /Lib/test/test_bytes.py | |
parent | e27a51c11e10d5df79b3e48dc3e7bfedfad5a794 (diff) | |
download | cpython-fcce8c649a14f7a81fae82f9f203bb5b5ee0c205.zip cpython-fcce8c649a14f7a81fae82f9f203bb5b5ee0c205.tar.gz cpython-fcce8c649a14f7a81fae82f9f203bb5b5ee0c205.tar.bz2 |
bpo-40275: Use new test.support helper submodules in tests (GH-21772)
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 61b4b91..e61228d 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -17,6 +17,7 @@ import unittest import test.support from test.support import import_helper +from test.support import warnings_helper import test.string_tests import test.list_tests from test.support import bigaddrspacetest, MAX_Py_ssize_t @@ -27,7 +28,7 @@ if sys.flags.bytes_warning: def check_bytes_warnings(func): @functools.wraps(func) def wrapper(*args, **kw): - with test.support.check_warnings(('', BytesWarning)): + with warnings_helper.check_warnings(('', BytesWarning)): return func(*args, **kw) return wrapper else: @@ -1769,7 +1770,7 @@ class AssortedBytesTest(unittest.TestCase): "BytesWarning is needed for this test: use -bb option") def test_compare(self): def bytes_warning(): - return test.support.check_warnings(('', BytesWarning)) + return warnings_helper.check_warnings(('', BytesWarning)) with bytes_warning(): b'' == '' with bytes_warning(): |