summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dbm_ndbm.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-08 11:05:24 (GMT)
committerGitHub <noreply@github.com>2020-08-08 11:05:24 (GMT)
commitc6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7 (patch)
treec5f4f5c88c8a12e9daa8ca2786913c9beda7b4cb /Lib/test/test_dbm_ndbm.py
parentd94af3f7ed98e6bfb4bf5f918f464b5e23d3ed1b (diff)
downloadcpython-c6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7.zip
cpython-c6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7.tar.gz
cpython-c6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7.tar.bz2
bpo-40275: Use new test.support helper submodules in tests (GH-21785)
Diffstat (limited to 'Lib/test/test_dbm_ndbm.py')
-rw-r--r--Lib/test/test_dbm_ndbm.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_dbm_ndbm.py b/Lib/test/test_dbm_ndbm.py
index e17a1d9..639c833 100644
--- a/Lib/test/test_dbm_ndbm.py
+++ b/Lib/test/test_dbm_ndbm.py
@@ -1,4 +1,3 @@
-from test import support
from test.support import import_helper
from test.support import os_helper
import_helper.import_module("dbm.ndbm") #skip if not supported
@@ -16,7 +15,7 @@ class DbmTestCase(unittest.TestCase):
def tearDown(self):
for suffix in ['', '.pag', '.dir', '.db']:
- support.unlink(self.filename + suffix)
+ os_helper.unlink(self.filename + suffix)
def test_keys(self):
self.d = dbm.ndbm.open(self.filename, 'c')
@@ -108,7 +107,7 @@ class DbmTestCase(unittest.TestCase):
def test_nonascii_filename(self):
filename = os_helper.TESTFN_NONASCII
for suffix in ['', '.pag', '.dir', '.db']:
- self.addCleanup(support.unlink, filename + suffix)
+ self.addCleanup(os_helper.unlink, filename + suffix)
with dbm.ndbm.open(filename, 'c') as db:
db[b'key'] = b'value'
self.assertTrue(any(os.path.exists(filename + suffix)