@@ -286,6 +286,24 @@ def test_executable_symlinks(self): |
|
|
286 |
286 |
out, err = p.communicate() |
287 |
287 |
self.assertEqual(out.strip(), envpy.encode()) |
288 |
288 |
|
|
289 |
+@unittest.skipUnless(os.name == 'nt', 'only relevant on Windows') |
|
290 |
+def test_unicode_in_batch_file(self): |
|
291 |
+""" |
|
292 |
+ Test isolation from system site-packages |
|
293 |
+ """ |
|
294 |
+rmtree(self.env_dir) |
|
295 |
+env_dir = os.path.join(os.path.realpath(self.env_dir), 'ϼўТλФЙ') |
|
296 |
+builder = venv.EnvBuilder(clear=True) |
|
297 |
+builder.create(env_dir) |
|
298 |
+activate = os.path.join(env_dir, self.bindir, 'activate.bat') |
|
299 |
+envpy = os.path.join(env_dir, self.bindir, self.exe) |
|
300 |
+cmd = [activate, '&', self.exe, '-c', 'print(0)'] |
|
301 |
+p = subprocess.Popen(cmd, stdout=subprocess.PIPE, |
|
302 |
+stderr=subprocess.PIPE, encoding='oem', |
|
303 |
+shell=True) |
|
304 |
+out, err = p.communicate() |
|
305 |
+print(err) |
|
306 |
+self.assertEqual(out.strip(), '0') |
289 |
307 |
|
290 |
308 |
@skipInVenv |
291 |
309 |
class EnsurePipTest(BaseTest): |