mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21412)
This commit is contained in:
parent
61bb24a270
commit
96a6a6d42b
18 changed files with 154 additions and 134 deletions
|
|
@ -10,6 +10,7 @@ import codecs
|
|||
import binascii
|
||||
import collections
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from io import BytesIO
|
||||
|
||||
from plistlib import UID
|
||||
|
|
@ -110,7 +111,7 @@ class TestPlistlib(unittest.TestCase):
|
|||
|
||||
def tearDown(self):
|
||||
try:
|
||||
os.unlink(support.TESTFN)
|
||||
os.unlink(os_helper.TESTFN)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
|
@ -148,10 +149,10 @@ class TestPlistlib(unittest.TestCase):
|
|||
|
||||
def test_io(self):
|
||||
pl = self._create()
|
||||
with open(support.TESTFN, 'wb') as fp:
|
||||
with open(os_helper.TESTFN, 'wb') as fp:
|
||||
plistlib.dump(pl, fp)
|
||||
|
||||
with open(support.TESTFN, 'rb') as fp:
|
||||
with open(os_helper.TESTFN, 'rb') as fp:
|
||||
pl2 = plistlib.load(fp)
|
||||
|
||||
self.assertEqual(dict(pl), dict(pl2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue