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

Method test_unicode_in_batch_file

Lib/test/test_venv.py:580–593  ·  view source on GitHub ↗

Test handling of Unicode paths

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected