mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21151)
Use new test.support helper submodules in tests: * distutils tests * test_buffer * test_compile * test_filecmp * test_fileinput * test_readline * test_smtpnet * test_structmembers * test_tools
This commit is contained in:
parent
700cfa8c90
commit
847f94f47b
20 changed files with 69 additions and 42 deletions
|
|
@ -5,13 +5,14 @@ import tempfile
|
|||
import unittest
|
||||
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
|
||||
|
||||
class FileCompareTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.name = support.TESTFN
|
||||
self.name_same = support.TESTFN + '-same'
|
||||
self.name_diff = support.TESTFN + '-diff'
|
||||
self.name = os_helper.TESTFN
|
||||
self.name_same = os_helper.TESTFN + '-same'
|
||||
self.name_diff = os_helper.TESTFN + '-diff'
|
||||
data = 'Contents of file go here.\n'
|
||||
for name in [self.name, self.name_same, self.name_diff]:
|
||||
with open(name, 'w') as output:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue