Skip to content

Commit 844afe4

Browse files
authored
Delete some non-functional python 2 compat code from test runner (#237)
1 parent 397ea0c commit 844afe4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

tools/please_pex/pex/test_runners/unittest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ def import_tests():
5252
yield import_module(pkg_name)
5353
except ImportError:
5454
with open(filename, 'r') as f:
55-
if PY_VERSION.major < 3:
56-
mod = imp.load_module(pkg_name, f, filename, ('.py', 'r', imp.PY_SOURCE))
57-
else:
58-
mod = machinery.SourceFileLoader(pkg_name, filename).load_module()
55+
mod = machinery.SourceFileLoader(pkg_name, filename).load_module()
5956

6057
# Have to set the attribute on the parent module too otherwise some things
6158
# can't find it.

0 commit comments

Comments
 (0)