mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21314)
This commit is contained in:
parent
9ce8132e1f
commit
883bc63833
19 changed files with 225 additions and 194 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue