summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-07 15:58:50 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-07 15:58:50 (GMT)
commitef3062f7afec3a6f291050beaa6ef5d56f7047f3 (patch)
tree45740fc259d3fd94d1358049c3ec9ab177fdebb0 /Lib
parent313570a1851bbe8c44af07be2eceb021fea6c994 (diff)
downloadcpython-ef3062f7afec3a6f291050beaa6ef5d56f7047f3.zip
cpython-ef3062f7afec3a6f291050beaa6ef5d56f7047f3.tar.gz
cpython-ef3062f7afec3a6f291050beaa6ef5d56f7047f3.tar.bz2
Kill dead code in importlib.test.__main__ (#12019, reviewed by Brett Cannon)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/importlib/test/__main__.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/importlib/test/__main__.py b/Lib/importlib/test/__main__.py
index decc53d..a1990b1 100644
--- a/Lib/importlib/test/__main__.py
+++ b/Lib/importlib/test/__main__.py
@@ -4,7 +4,6 @@ Specifying the ``--builtin`` flag will run tests, where applicable, with
builtins.__import__ instead of importlib.__import__.
"""
-import importlib
from importlib.test.import_ import util
import os.path
from test.support import run_unittest
@@ -13,11 +12,7 @@ import unittest
def test_main():
- if '__pycache__' in __file__:
- parts = __file__.split(os.path.sep)
- start_dir = sep.join(parts[:-2])
- else:
- start_dir = os.path.dirname(__file__)
+ start_dir = os.path.dirname(__file__)
top_dir = os.path.dirname(os.path.dirname(start_dir))
test_loader = unittest.TestLoader()
if '--builtin' in sys.argv: