(self)
| 118 | self.assertIs(x, y) |
| 119 | |
| 120 | def test_nodelist_deepcopy(self): |
| 121 | # Empty NodeList. |
| 122 | node_list = NodeList() |
| 123 | copied = copy.deepcopy(node_list) |
| 124 | self.assertIsNot(copied, node_list) |
| 125 | self.assertEqual(copied, node_list) |
| 126 | |
| 127 | # Non-empty NodeList. |
| 128 | node_list.append([1]) |
| 129 | node_list.append([2]) |
| 130 | copied = copy.deepcopy(node_list) |
| 131 | self.assertIsNot(copied, node_list) |
| 132 | self.assertEqual(copied, node_list) |
| 133 | for x, y in zip(copied, node_list): |
| 134 | self.assertIsNot(x, y) |
| 135 | self.assertEqual(x, y) |
| 136 | |
| 137 | if __name__ == '__main__': |
| 138 | unittest.main() |
nothing calls this directly
no test coverage detected