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/unittest_regrtest.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/unittest_regrtest.py')
-rw-r--r-- | tests/unittest_regrtest.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/unittest_regrtest.py b/tests/unittest_regrtest.py index d25dfb74..5d00ecf0 100644 --- a/tests/unittest_regrtest.py +++ b/tests/unittest_regrtest.py @@ -22,7 +22,6 @@ import textwrap import unittest from astroid import MANAGER, Instance, nodes, test_utils -from astroid.bases import BUILTINS from astroid.builder import AstroidBuilder, extract_node from astroid.exceptions import InferenceError from astroid.raw_building import build_module @@ -201,7 +200,7 @@ def test(): ) ancestors = list(node.ancestors()) self.assertEqual(len(ancestors), 1) - self.assertEqual(ancestors[0].qname(), f"{BUILTINS}.object") + self.assertEqual(ancestors[0].qname(), "builtins.object") def test_ancestors_missing_from_function(self): # Test for https://www.logilab.org/ticket/122793 |