(self, deep, testName)
| 928 | # Testing attribute clones uses a helper, and should always be deep, |
| 929 | # even if the argument to cloneNode is false. |
| 930 | def check_clone_attribute(self, deep, testName): |
| 931 | doc = parseString("<doc attr='value'/>") |
| 932 | attr = doc.documentElement.getAttributeNode("attr") |
| 933 | self.assertIsNotNone(attr) |
| 934 | clone = attr.cloneNode(deep) |
| 935 | self.assertFalse(clone.isSameNode(attr)) |
| 936 | self.assertFalse(attr.isSameNode(clone)) |
| 937 | self.assertIsNone(clone.ownerElement, |
| 938 | testName + ": ownerElement should be None") |
| 939 | self.confirm(clone.ownerDocument.isSameNode(attr.ownerDocument), |
| 940 | testName + ": ownerDocument does not match") |
| 941 | self.confirm(clone.specified, |
| 942 | testName + ": cloned attribute must have specified == True") |
| 943 | |
| 944 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 945 | def testCloneAttributeShallow(self): |
no test coverage detected