(self)
| 102 | self.assertEqual(unpickled, node_list) |
| 103 | |
| 104 | def test_nodelist_copy(self): |
| 105 | # Empty NodeList. |
| 106 | node_list = NodeList() |
| 107 | copied = copy.copy(node_list) |
| 108 | self.assertIsNot(copied, node_list) |
| 109 | self.assertEqual(copied, node_list) |
| 110 | |
| 111 | # Non-empty NodeList. |
| 112 | node_list.append([1]) |
| 113 | node_list.append([2]) |
| 114 | copied = copy.copy(node_list) |
| 115 | self.assertIsNot(copied, node_list) |
| 116 | self.assertEqual(copied, node_list) |
| 117 | for x, y in zip(copied, node_list): |
| 118 | self.assertIs(x, y) |
| 119 | |
| 120 | def test_nodelist_deepcopy(self): |
| 121 | # Empty NodeList. |
nothing calls this directly
no test coverage detected