mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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,7 +2,7 @@
|
|||
|
||||
import os
|
||||
import unittest
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from test.support import hashlib_helper
|
||||
from test.support.script_helper import assert_python_ok, assert_python_failure
|
||||
|
||||
|
@ -15,8 +15,8 @@ class MD5SumTests(unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.script = os.path.join(scriptsdir, 'md5sum.py')
|
||||
os.mkdir(support.TESTFN)
|
||||
cls.fodder = os.path.join(support.TESTFN, 'md5sum.fodder')
|
||||
os.mkdir(os_helper.TESTFN)
|
||||
cls.fodder = os.path.join(os_helper.TESTFN, 'md5sum.fodder')
|
||||
with open(cls.fodder, 'wb') as f:
|
||||
f.write(b'md5sum\r\ntest file\r\n')
|
||||
cls.fodder_md5 = b'd38dae2eb1ab346a292ef6850f9e1a0d'
|
||||
|
@ -24,7 +24,7 @@ class MD5SumTests(unittest.TestCase):
|
|||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
support.rmtree(support.TESTFN)
|
||||
os_helper.rmtree(os_helper.TESTFN)
|
||||
|
||||
def test_noargs(self):
|
||||
rc, out, err = assert_python_ok(self.script)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue