diff options
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r-- | Lib/test/test_file.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index cd642e7..1497675 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -7,8 +7,9 @@ from weakref import proxy import io import _pyio as pyio -from test.support import TESTFN -from test import support +from test.support.os_helper import TESTFN +from test.support import os_helper +from test.support import warnings_helper from collections import UserList class AutoFileTests: @@ -20,7 +21,7 @@ class AutoFileTests: def tearDown(self): if self.f: self.f.close() - support.unlink(TESTFN) + os_helper.unlink(TESTFN) def testWeakRefs(self): # verify weak references @@ -139,7 +140,7 @@ class PyAutoFileTests(AutoFileTests, unittest.TestCase): class OtherFileTests: def tearDown(self): - support.unlink(TESTFN) + os_helper.unlink(TESTFN) def testModeStrings(self): # check invalid mode strings @@ -187,7 +188,7 @@ class OtherFileTests: # make sure that explicitly setting the buffer size doesn't cause # misbehaviour especially with repeated close() calls for s in (-1, 0, 512): - with support.check_no_warnings(self, + with warnings_helper.check_no_warnings(self, message='line buffering', category=RuntimeWarning): self._checkBufferSize(s) |