|
22 | 22 | _testbuffer = None |
23 | 23 |
|
24 | 24 | from test import support |
| 25 | +from test.support import os_helper |
25 | 26 | from test.support import ( |
26 | | - TestFailed, TESTFN, run_with_locale, no_tracing, |
27 | | - _2G, _4G, bigmemtest, reap_threads, forget, |
28 | | - save_restore_warnings_filters |
| 27 | + TestFailed, run_with_locale, no_tracing, |
| 28 | + _2G, _4G, bigmemtest, reap_threads |
29 | 29 | ) |
| 30 | +from test.support.import_helper import forget |
| 31 | +from test.support.os_helper import TESTFN |
| 32 | +from test.support.warnings_helper import save_restore_warnings_filters |
30 | 33 |
|
31 | 34 | from pickle import bytes_types |
32 | 35 |
|
@@ -3302,15 +3305,15 @@ def test_dump_closed_file(self): |
3302 | 3305 | f.close() |
3303 | 3306 | self.assertRaises(ValueError, self.dump, 123, f) |
3304 | 3307 | finally: |
3305 | | - support.unlink(TESTFN) |
| 3308 | + os_helper.unlink(TESTFN) |
3306 | 3309 |
|
3307 | 3310 | def test_load_closed_file(self): |
3308 | 3311 | f = open(TESTFN, "wb") |
3309 | 3312 | try: |
3310 | 3313 | f.close() |
3311 | 3314 | self.assertRaises(ValueError, self.dump, 123, f) |
3312 | 3315 | finally: |
3313 | | - support.unlink(TESTFN) |
| 3316 | + os_helper.unlink(TESTFN) |
3314 | 3317 |
|
3315 | 3318 | def test_load_from_and_dump_to_file(self): |
3316 | 3319 | stream = io.BytesIO() |
@@ -3341,7 +3344,7 @@ def test_dump_text_file(self): |
3341 | 3344 | self.assertRaises(TypeError, self.dump, 123, f, proto) |
3342 | 3345 | finally: |
3343 | 3346 | f.close() |
3344 | | - support.unlink(TESTFN) |
| 3347 | + os_helper.unlink(TESTFN) |
3345 | 3348 |
|
3346 | 3349 | def test_incomplete_input(self): |
3347 | 3350 | s = io.BytesIO(b"X''.") |
|
0 commit comments