bpo-40275: Use new test.support helper submodules in tests (GH-21169)

This commit is contained in:
Hai Shi 2020-06-30 21:46:31 +08:00 committed by GitHub
parent 3ddc634cd5
commit 0c4f0f3b29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 348 additions and 319 deletions

View file

@ -2,6 +2,7 @@
import unittest
from test import support
from test.support import os_helper
import os
@ -234,11 +235,11 @@ class BoolTest(unittest.TestCase):
def test_fileclosed(self):
try:
with open(support.TESTFN, "w") as f:
with open(os_helper.TESTFN, "w") as f:
self.assertIs(f.closed, False)
self.assertIs(f.closed, True)
finally:
os.remove(support.TESTFN)
os.remove(os_helper.TESTFN)
def test_types(self):
# types are always true.