diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-07-06 09:12:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 09:12:49 (GMT) |
commit | 883bc638335a57a6e6a6344c2fc132c4f9a0ec42 (patch) | |
tree | 1dd74a4aeeb80d8b85ff18de700763199a7bc1bc /Lib/test/pickletester.py | |
parent | 9ce8132e1f2339cfe116dfd4795574182c2245b4 (diff) | |
download | cpython-883bc638335a57a6e6a6344c2fc132c4f9a0ec42.zip cpython-883bc638335a57a6e6a6344c2fc132c4f9a0ec42.tar.gz cpython-883bc638335a57a6e6a6344c2fc132c4f9a0ec42.tar.bz2 |
bpo-40275: Use new test.support helper submodules in tests (GH-21314)
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index a34505a..afbc2b3 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -22,10 +22,13 @@ except ImportError: _testbuffer = None from test import support +from test.support import os_helper from test.support import ( - TestFailed, TESTFN, run_with_locale, no_tracing, - _2G, _4G, bigmemtest, forget, + TestFailed, run_with_locale, no_tracing, + _2G, _4G, bigmemtest ) +from test.support.import_helper import forget +from test.support.os_helper import TESTFN from test.support import threading_helper from test.support.warnings_helper import save_restore_warnings_filters @@ -3100,7 +3103,7 @@ class AbstractPickleModuleTests(unittest.TestCase): f.close() self.assertRaises(ValueError, self.dump, 123, f) finally: - support.unlink(TESTFN) + os_helper.unlink(TESTFN) def test_load_closed_file(self): f = open(TESTFN, "wb") @@ -3108,7 +3111,7 @@ class AbstractPickleModuleTests(unittest.TestCase): f.close() self.assertRaises(ValueError, self.dump, 123, f) finally: - support.unlink(TESTFN) + os_helper.unlink(TESTFN) def test_load_from_and_dump_to_file(self): stream = io.BytesIO() @@ -3139,7 +3142,7 @@ class AbstractPickleModuleTests(unittest.TestCase): self.assertRaises(TypeError, self.dump, 123, f, proto) finally: f.close() - support.unlink(TESTFN) + os_helper.unlink(TESTFN) def test_incomplete_input(self): s = io.BytesIO(b"X''.") |