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

Method roundtrip

Lib/test/test_tokenize.py:2196–2199  ·  view source on GitHub ↗
(self, code)

Source from the content-addressed store, hash-verified

2194
2195
2196 def roundtrip(self, code):
2197 if isinstance(code, str):
2198 code = code.encode('utf-8')
2199 return tokenize.untokenize(tokenize.tokenize(BytesIO(code).readline)).decode('utf-8')
2200
2201 def test_indentation_semantics_retained(self):
2202 """

Calls 5

BytesIOClass · 0.90
isinstanceFunction · 0.85
untokenizeMethod · 0.80
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected