MCPcopy Index your code
hub / github.com/python/cpython / roundtrip

Method roundtrip

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

Source from the content-addressed store, hash-verified

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

Calls 4

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

Tested by

no test coverage detected