(self)
| 1581 | # Additional tests that only work with str. |
| 1582 | |
| 1583 | def test_bug1001011(self): |
| 1584 | # Make sure join returns a NEW object for single item sequences |
| 1585 | # involving a subclass. |
| 1586 | # Make sure that it is of the appropriate type. |
| 1587 | # Check the optimisation still occurs for standard objects. |
| 1588 | t = self.type2test |
| 1589 | class subclass(t): |
| 1590 | pass |
| 1591 | s1 = subclass("abcd") |
| 1592 | s2 = t().join([s1]) |
| 1593 | self.assertIsNot(s1, s2) |
| 1594 | self.assertIs(type(s2), t) |
| 1595 | |
| 1596 | s1 = t("abcd") |
| 1597 | s2 = t().join([s1]) |
| 1598 | self.assertIs(s1, s2) |
nothing calls this directly
no test coverage detected