summaryrefslogtreecommitdiff
path: root/Lib/test/test_configparser.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-04 00:41:24 +0800
committerGitHub <noreply@github.com>2020-08-03 18:41:24 +0200
commita7f5d93bb6906d0f999248b47295d3a59b130f4d (patch)
treea0dc5043ecc7a4250902f8d14c802382b1c94b8a /Lib/test/test_configparser.py
parent488512bf4953d856fcb049a05060a450af52fcdc (diff)
downloadcpython-git-a7f5d93bb6906d0f999248b47295d3a59b130f4d.tar.gz
bpo-40275: Use new test.support helper submodules in tests (GH-21449)
Diffstat (limited to 'Lib/test/test_configparser.py')
-rw-r--r--Lib/test/test_configparser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py
index f16da116a7..230ffc1ccf 100644
--- a/Lib/test/test_configparser.py
+++ b/Lib/test/test_configparser.py
@@ -8,6 +8,7 @@ import unittest
import warnings
from test import support
+from test.support import os_helper
class SortedDict(collections.UserDict):
@@ -1063,17 +1064,17 @@ class MultilineValuesTestCase(BasicTestCase, unittest.TestCase):
cf.add_section(s)
for j in range(10):
cf.set(s, 'lovely_spam{}'.format(j), self.wonderful_spam)
- with open(support.TESTFN, 'w') as f:
+ with open(os_helper.TESTFN, 'w') as f:
cf.write(f)
def tearDown(self):
- os.unlink(support.TESTFN)
+ os.unlink(os_helper.TESTFN)
def test_dominating_multiline_values(self):
# We're reading from file because this is where the code changed
# during performance updates in Python 3.2
cf_from_file = self.newconfig()
- with open(support.TESTFN) as f:
+ with open(os_helper.TESTFN) as f:
cf_from_file.read_file(f)
self.assertEqual(cf_from_file.get('section8', 'lovely_spam4'),
self.wonderful_spam.replace('\t\n', '\n'))