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

Method test_ioencoding_nonascii

Lib/test/test_sys.py:943–951  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

941 'requires FS encoding to match locale')
942 @support.requires_subprocess()
943 def test_ioencoding_nonascii(self):
944 env = dict(os.environ)
945
946 env["PYTHONIOENCODING"] = ""
947 p = subprocess.Popen([sys.executable, "-c",
948 'print(%a)' % os_helper.FS_NONASCII],
949 stdout=subprocess.PIPE, env=env)
950 out = p.communicate()[0].strip()
951 self.assertEqual(out, os.fsencode(os_helper.FS_NONASCII))
952
953 @unittest.skipIf(sys.base_prefix != sys.prefix,
954 'Test is not venv-compatible')

Callers

nothing calls this directly

Calls 4

communicateMethod · 0.95
fsencodeMethod · 0.80
stripMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected