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

Method test_unicode_in_batch_file

Lib/test/test_venv.py:578–591  ·  view source on GitHub ↗

Test handling of Unicode paths

(self)

Source from the content-addressed store, hash-verified

576
577 @unittest.skipUnless(os.name == 'nt', 'only relevant on Windows')
578 def test_unicode_in_batch_file(self):
579 """
580 Test handling of Unicode paths
581 """
582 rmtree(self.env_dir)
583 env_dir = os.path.join(os.path.realpath(self.env_dir), 'ϼўТλФЙ')
584 builder = venv.EnvBuilder(clear=True)
585 builder.create(env_dir)
586 activate = os.path.join(env_dir, self.bindir, 'activate.bat')
587 out, err = check_output(
588 [activate, '&', self.exe, '-c', 'print(0)'],
589 encoding='oem',
590 )
591 self.assertEqual(out.strip(), '0')
592
593 @unittest.skipUnless(os.name == 'nt' and can_symlink(),
594 'symlinks on Windows')

Callers

nothing calls this directly

Calls 7

rmtreeFunction · 0.90
realpathMethod · 0.80
check_outputFunction · 0.70
joinMethod · 0.45
createMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected