summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-07 17:33:30 +0100
committerMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-07 17:33:30 +0100
commit973e22ee939b7329a8b8cd404fc41174d635f417 (patch)
tree7df19382796040da69d25499633edad5a963bd23
parent2a6ed746fbc3bb93b44f2c9f4172bbcc5b8986bd (diff)
downloadastroid-git-973e22ee939b7329a8b8cd404fc41174d635f417.tar.gz
Add test
-rw-r--r--tests/unittest_scoped_nodes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unittest_scoped_nodes.py b/tests/unittest_scoped_nodes.py
index 8d1cb216..db88dca2 100644
--- a/tests/unittest_scoped_nodes.py
+++ b/tests/unittest_scoped_nodes.py
@@ -1758,6 +1758,12 @@ class ClassNodeTest(ModuleLoader, unittest.TestCase):
cls = astroid["TestKlass"]
self.assertEqual(len(cls.keywords), 2)
self.assertEqual([x.arg for x in cls.keywords], ["foo", "bar"])
+ children = list(cls.get_children())
+ assert len(children) == 4
+ assert isinstance(children[1], nodes.Keyword)
+ assert isinstance(children[2], nodes.Keyword)
+ assert children[1].arg == "foo"
+ assert children[2].arg == "bar"
def test_kite_graph(self):
data = """