diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-18 23:04:14 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-18 23:17:45 +0200 |
commit | 44fc1e1e23fd1d3b43cf80a10eb1c032a4312a2b (patch) | |
tree | 5c6c2ad5028be821b72fdbda71160fe22b93f0e3 /tests/resources.py | |
parent | 76036144e4b0049575d5c2f0c64d6365529ee9e7 (diff) | |
download | astroid-git-builtin-simplified.tar.gz |
Replace the constant BUILTINS by the string 'builtins'builtin-simplified
This make for clearer and also sligtly faster code (means time
seems to decrese by 0.68% with this change alone (astroid/pylint)
in the pylint tests benchmarks). Done because we were using an
import from astroid from astroid.bases for one of those, which is
kinda messy.
Diffstat (limited to 'tests/resources.py')
-rw-r--r-- | tests/resources.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/resources.py b/tests/resources.py index 04e51414..e01440f2 100644 --- a/tests/resources.py +++ b/tests/resources.py @@ -15,7 +15,6 @@ import os import sys from astroid import builder -from astroid.bases import BUILTINS from astroid.manager import AstroidManager DATA_DIR = os.path.join("testdata", "python3") @@ -58,9 +57,9 @@ class AstroidCacheSetupMixin: @classmethod def setup_class(cls): - cls._builtins = AstroidManager().astroid_cache.get(BUILTINS) + cls._builtins = AstroidManager().astroid_cache.get("builtins") @classmethod def teardown_class(cls): if cls._builtins: - AstroidManager().astroid_cache[BUILTINS] = cls._builtins + AstroidManager().astroid_cache["builtins"] = cls._builtins |