diff options
| author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2014-07-24 13:22:39 +0200 |
|---|---|---|
| committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2014-07-24 13:22:39 +0200 |
| commit | 6700d0d86153d051c1e7c36b86e06408eb93fc38 (patch) | |
| tree | a5090227efad33e0d08eb40c7992d96cf7e0fd7b | |
| parent | 5e2265e596f9e8b0b0f29c0dc3f890c2110b55dd (diff) | |
| download | astroid-git-6700d0d86153d051c1e7c36b86e06408eb93fc38.tar.gz | |
attempt to fix a failure only occuring on the drone.io platform
| -rw-r--r-- | raw_building.py | 2 | ||||
| -rw-r--r-- | test/unittest_manager.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/raw_building.py b/raw_building.py index c2739df9..b3bccc01 100644 --- a/raw_building.py +++ b/raw_building.py @@ -345,7 +345,7 @@ def astroid_bootstrapping(): node_cls._proxied = proxy else: _CONST_PROXY[cls] = proxy - + MANAGER.astroid_cache[builtins.__name__] = astroid_builtin astroid_bootstrapping() # TODO : find a nicer way to handle this situation; diff --git a/test/unittest_manager.py b/test/unittest_manager.py index 7f1c23cd..321f9541 100644 --- a/test/unittest_manager.py +++ b/test/unittest_manager.py @@ -22,6 +22,7 @@ from os.path import join, abspath, dirname from astroid.manager import AstroidManager, _silent_no_wrap from astroid.bases import BUILTINS from astroid.exceptions import AstroidBuildingException +from astroid.raw_building import astroid_bootstrapping DATA = join(dirname(abspath(__file__)), 'data') PY3K = sys.version_info > (3, 0) @@ -30,6 +31,11 @@ class AstroidManagerTC(TestCase): def setUp(self): self.manager = AstroidManager() self.manager.astroid_cache.clear() + # force bootstrap again, else we may ends up with cache inconsistency + # between the manager and CONST_PROXY, making + # unittest_lookup.LookupTC.test_builtin_lookup fail depending on the + # test order + astroid_bootstrapping() def test_ast_from_file(self): """check if the method return a good astroid object""" |
