MCPcopy Index your code
hub / github.com/RustPython/RustPython / CustomStr

Class CustomStr

Lib/test/test_android.py:210–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 # String subclasses are accepted, but they should be converted
209 # to a standard str without calling any of their methods.
210 class CustomStr(str):
211 def splitlines(self, *args, **kwargs):
212 raise AssertionError()
213
214 def __len__(self):
215 raise AssertionError()
216
217 def __str__(self):
218 raise AssertionError()
219
220 write(CustomStr("custom\n"), ["custom"], write_len=7)
221

Callers 1

test_strMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_strMethod · 0.56