From 626fa60d03ce0ff8ad28d368612d0eaa3d73a48f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Dec 2015 22:37:20 +0100 Subject: [PATCH] Revert "clean out the last_* fields of sys before importing it." This reverts commit be399c81c309c4d9e98f814ab55cc23e36a6a164. Will break python 2.6 (possibly 2.7) tests; this is expected behaviour. See https://github.com/davidhalter/jedi/pull/661#discussion_r47543815 --- test/test_api/test_api.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/test_api/test_api.py b/test/test_api/test_api.py index 72ff57e3..926f41a2 100644 --- a/test/test_api/test_api.py +++ b/test/test_api/test_api.py @@ -9,13 +9,6 @@ from jedi._compatibility import is_py3 from pytest import raises -def _clear_last_exception_fields_in_sys(): - import sys - sys.last_type = None - sys.last_value = None - sys.last_traceback = None - - def test_preload_modules(): def check_loaded(*modules): # +1 for None module (currently used) @@ -27,7 +20,6 @@ def test_preload_modules(): temp_cache, cache.parser_cache = cache.parser_cache, {} parser_cache = cache.parser_cache - _clear_last_exception_fields_in_sys() api.preload_module('sys') check_loaded() # compiled (c_builtin) modules shouldn't be in the cache. api.preload_module('json', 'token')