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

This commit is contained in:
Hai Shi 2020-08-07 23:18:38 +08:00 committed by GitHub
parent 46e19b61d3
commit 598a951844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 97 additions and 84 deletions

View file

@ -9,6 +9,7 @@
import unittest
from test import support
from test.support import os_helper
import os
import platform
import sys
@ -27,7 +28,7 @@ class TestCase(unittest.TestCase):
# we're not about to delete. If we're running under -j, that
# means the test harness provided directory isn't a safe option.
# See http://bugs.python.org/issue15526 for more details
with support.change_cwd(path.dirname(sys.executable)):
with os_helper.change_cwd(path.dirname(sys.executable)):
empty = path.join(path.dirname(__file__), "empty.vbs")
startfile(empty)
startfile(empty, "open")