Assert that the number of children are the same on the cloned schema and the clone.

This commit is contained in:
Andreas Kaiser 2016-10-26 11:30:38 +02:00
parent 2befe11ce7
commit cc5028056a
1 changed files with 1 additions and 0 deletions

View File

@ -2795,6 +2795,7 @@ class TestSchemaNode(unittest.TestCase):
def compare_children(schema, cloned):
# children of the clone must match the cloned node's children and
# have to be clones themselves.
self.assertEqual(len(schema.children), len(cloned.children))
for child, child_clone in zip(schema.children, cloned.children):
self.assertIsNot(child, child_clone)
for name in child.__dict__.keys():