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

Method check

Lib/test/test_utf8_mode.py:227–230  ·  view source on GitHub ↗
(utf8_opt, expected, **kw)

Source from the content-addressed store, hash-verified

225 code = 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))'
226
227 def check(utf8_opt, expected, **kw):
228 out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw)
229 args = out.partition(':')[2].rstrip()
230 self.assertEqual(args, ascii(expected), out)
231
232 check('utf8', [arg_utf8])
233 for loc in POSIX_LOCALES:

Callers

nothing calls this directly

Calls 5

get_outputMethod · 0.95
asciiFunction · 0.85
rstripMethod · 0.45
partitionMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected