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

Method check

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

Source from the content-addressed store, hash-verified

217 code = 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))'
218
219 def check(utf8_opt, expected, **kw):
220 out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw)
221 args = out.partition(':')[2].rstrip()
222 self.assertEqual(args, ascii(expected), out)
223
224 check('utf8', [arg_utf8])
225 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