| 108 | # String subclasses are accepted, but they should be converted |
| 109 | # to a standard str without calling any of their methods. |
| 110 | class CustomStr(str): |
| 111 | def splitlines(self, *args, **kwargs): |
| 112 | raise AssertionError() |
| 113 | |
| 114 | def __len__(self): |
| 115 | raise AssertionError() |
| 116 | |
| 117 | def __str__(self): |
| 118 | raise AssertionError() |
| 119 | |
| 120 | self.log.write(CustomStr("custom\n")) |
| 121 | self.assert_writes([b"custom\n"]) |
no outgoing calls
searching dependent graphs…