コード例 #1
0
 def test_depth_recursion(self):
     A = Group('A')
     B = Group('B')
     A.add_child_group(B)
     # hypothetical of adding B as child group to A
     A.parent_groups.append(B)
     B.child_groups.append(A)
     # can't update depths of groups, because of loop
     with self.assertRaises(AnsibleError):
         B._check_children_depth()
コード例 #2
0
ファイル: test_group.py プロジェクト: awiddersheim/ansible
 def test_depth_recursion(self):
     A = Group('A')
     B = Group('B')
     A.add_child_group(B)
     # hypothetical of adding B as child group to A
     A.parent_groups.append(B)
     B.child_groups.append(A)
     # can't update depths of groups, because of loop
     with self.assertRaises(AnsibleError):
         B._check_children_depth()