From 973e22ee939b7329a8b8cd404fc41174d635f417 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 7 Mar 2021 17:33:30 +0100 Subject: Add test --- tests/unittest_scoped_nodes.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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 = """ -- cgit v1.2.1