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/test_binhex.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/test_binhex.py')
-rw-r--r-- | Lib/test/test_binhex.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py index 591f32a..5e59f57 100644 --- a/Lib/test/test_binhex.py +++ b/Lib/test/test_binhex.py @@ -5,23 +5,27 @@ """ import unittest from test import support +from test.support import import_helper +from test.support import os_helper +from test.support import warnings_helper -with support.check_warnings(('', DeprecationWarning)): - binhex = support.import_fresh_module('binhex') + +with warnings_helper.check_warnings(('', DeprecationWarning)): + binhex = import_helper.import_fresh_module('binhex') class BinHexTestCase(unittest.TestCase): def setUp(self): # binhex supports only file names encodable to Latin1 - self.fname1 = support.TESTFN_ASCII + "1" - self.fname2 = support.TESTFN_ASCII + "2" - self.fname3 = support.TESTFN_ASCII + "very_long_filename__very_long_filename__very_long_filename__very_long_filename__" + self.fname1 = os_helper.TESTFN_ASCII + "1" + self.fname2 = os_helper.TESTFN_ASCII + "2" + self.fname3 = os_helper.TESTFN_ASCII + "very_long_filename__very_long_filename__very_long_filename__very_long_filename__" def tearDown(self): - support.unlink(self.fname1) - support.unlink(self.fname2) - support.unlink(self.fname3) + os_helper.unlink(self.fname1) + os_helper.unlink(self.fname2) + os_helper.unlink(self.fname3) DATA = b'Jack is my hero' |