mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21743)
This commit is contained in:
parent
52f98424a5
commit
79bb2c93f2
20 changed files with 73 additions and 56 deletions
|
@ -2,6 +2,7 @@ import os
|
|||
import sys
|
||||
import unittest
|
||||
import test.support as test_support
|
||||
from test.support import os_helper
|
||||
from tkinter import Tcl, TclError
|
||||
|
||||
test_support.requires('gui')
|
||||
|
@ -24,7 +25,7 @@ class TkLoadTest(unittest.TestCase):
|
|||
# XXX Maybe on tk older than 8.4.13 it would be possible,
|
||||
# see tkinter.h.
|
||||
return
|
||||
with test_support.EnvironmentVarGuard() as env:
|
||||
with os_helper.EnvironmentVarGuard() as env:
|
||||
if 'DISPLAY' in os.environ:
|
||||
del env['DISPLAY']
|
||||
# on some platforms, deleting environment variables
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue