summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-03 16:49:18 (GMT)
committerGitHub <noreply@github.com>2020-08-03 16:49:18 (GMT)
commit4660597b51b3d14ce6269d0ed865ab7e22c6ae1f (patch)
tree00ab23106abb1d0023e261685dc4f2077002aabd /Lib/test/test_argparse.py
parentbb0424b122e3d222a558bd4177ce37befd3e0347 (diff)
downloadcpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.zip
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.gz
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.bz2
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 22cae62..e98c15b 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -13,6 +13,7 @@ import argparse
from io import StringIO
from test import support
+from test.support import os_helper
from unittest import mock
class StdIOBuffer(StringIO):
pass
@@ -23,7 +24,7 @@ class TestCase(unittest.TestCase):
# The tests assume that line wrapping occurs at 80 columns, but this
# behaviour can be overridden by setting the COLUMNS environment
# variable. To ensure that this width is used, set COLUMNS to 80.
- env = support.EnvironmentVarGuard()
+ env = os_helper.EnvironmentVarGuard()
env['COLUMNS'] = '80'
self.addCleanup(env.__exit__)
@@ -3244,7 +3245,7 @@ class TestShortColumns(HelpTestCase):
but we don't want any exceptions thrown in such cases. Only ugly representation.
'''
def setUp(self):
- env = support.EnvironmentVarGuard()
+ env = os_helper.EnvironmentVarGuard()
env.set("COLUMNS", '15')
self.addCleanup(env.__exit__)