mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21743)
This commit is contained in:
parent
52f98424a5
commit
79bb2c93f2
20 changed files with 73 additions and 56 deletions
|
@ -2,6 +2,7 @@ import pickle
|
|||
import unittest
|
||||
from test import support
|
||||
from test.support import import_helper
|
||||
from test.support import os_helper
|
||||
|
||||
|
||||
turtle = import_helper.import_module('turtle')
|
||||
|
@ -52,10 +53,10 @@ visible = False
|
|||
class TurtleConfigTest(unittest.TestCase):
|
||||
|
||||
def get_cfg_file(self, cfg_str):
|
||||
self.addCleanup(support.unlink, support.TESTFN)
|
||||
with open(support.TESTFN, 'w') as f:
|
||||
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
|
||||
with open(os_helper.TESTFN, 'w') as f:
|
||||
f.write(cfg_str)
|
||||
return support.TESTFN
|
||||
return os_helper.TESTFN
|
||||
|
||||
def test_config_dict(self):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue