(self)
| 382 | '<tag key="value"><subtag /><subtag /></tag>') |
| 383 | |
| 384 | def test_positional_only_parameter(self): |
| 385 | # Test Element positional-only parameters (gh-144846). |
| 386 | |
| 387 | # 'tag' is positional-only |
| 388 | with self.assertRaises(TypeError): |
| 389 | ET.Element(tag='fail') |
| 390 | |
| 391 | # 'tag' and 'attrib' as kwarg/attribute names |
| 392 | e = ET.Element('e', attrib={'attrib': 'foo'}, tag='bar') |
| 393 | self.assertEqual(e.tag, 'e') |
| 394 | self.assertEqual(e.get('attrib'), 'foo') |
| 395 | self.assertEqual(e.get('tag'), 'bar') |
| 396 | |
| 397 | def test_cdata(self): |
| 398 | # Test CDATA handling (etc). |
nothing calls this directly
no test coverage detected