From 8c360dd3fbb24fa48e165bd0231fc9e5df76fe80 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Tue, 19 Dec 2017 21:38:15 -0600 Subject: [PATCH] Revert "Clear Python 2 .pyc files when Python 3 suite runs" This reverts commit 7a60cfd17150b904bad6bd952c9c5d089bc6f4a4. --- tests/runtests.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/runtests.py b/tests/runtests.py index 1f782346323..9941b97226e 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -16,17 +16,6 @@ if os.name == 'nt': TESTS_DIR = TESTS_DIR.replace('\\', '\\\\') CODE_DIR = os.path.dirname(TESTS_DIR) -if sys.version_info.major == 3: - # Clean up any Python 2 byte-compiled files, as they will cause problems - # when Python 3 tries to import modules. - for root, _, files in os.walk(os.path.dirname(TESTS_DIR)): - if os.path.basename(root) == '__pycache__': - # Ignore byte-compiled files in Python 3 __pycache__ dirs - continue - for filename in files: - if filename.endswith('.pyc'): - os.remove(os.path.join(root, filename)) - # Let's inject CODE_DIR so salt is importable if not there already if '' in sys.path: sys.path.remove('')