We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb33cb7 commit 9e78982Copy full SHA for 9e78982
tests/unittest_brain_builtin.py
@@ -0,0 +1,21 @@
1
+# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
2
+# For details: https://github.com/PyCQA/astroid/blob/main/LICENSE
3
+"""Unit Tests for the builtins brain module."""
4
+
5
+import unittest
6
7
+from astroid import extract_node, objects
8
9
+class BuiltinsTest(unittest.TestCase):
10
+ def test_infer_property(self):
11
+ class_with_property = extract_node(
12
+ """
13
+ class Something:
14
+ def getter():
15
+ return 5
16
+ asd = property(getter) #@
17
18
+ )
19
+ inferred_property = list(class_with_property.value.infer())[0]
20
+ assert isinstance(inferred_property, objects.Property)
21
+ assert hasattr(inferred_property, "args")
0 commit comments