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-21169)
This commit is contained in:
parent
3ddc634cd5
commit
0c4f0f3b29
14 changed files with 348 additions and 319 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue