summaryrefslogtreecommitdiff
path: root/tests/test_imports.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-04-19 22:16:48 -0700
committerDavid Lord <davidism@gmail.com>2020-04-20 07:12:52 -0700
commit62f84aa3242d6d9f57243b941b013b2536ea3b9c (patch)
tree66ce32c33fd03caebd121272650eece5e68f2b3c /tests/test_imports.py
parent00883dd3d0a29f68f375cab5e21cef0669941aba (diff)
downloadclick-62f84aa3242d6d9f57243b941b013b2536ea3b9c.tar.gz
remove more compat code
Diffstat (limited to 'tests/test_imports.py')
-rw-r--r--tests/test_imports.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/test_imports.py b/tests/test_imports.py
index b99d453..be8730f 100644
--- a/tests/test_imports.py
+++ b/tests/test_imports.py
@@ -6,10 +6,7 @@ from click._compat import WIN
IMPORT_TEST = b"""\
-try:
- import __builtin__ as builtins
-except ImportError:
- import builtins
+import builtins
found_imports = set()
real_import = builtins.__import__
@@ -61,9 +58,7 @@ def test_light_imports():
[sys.executable, "-"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
)
rv = c.communicate(IMPORT_TEST)[0]
-
- if sys.version_info[0] != 2:
- rv = rv.decode("utf-8")
+ rv = rv.decode("utf-8")
imported = json.loads(rv)
for module in imported: