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

Method test_isolation

Lib/test/test_venv.py:442–450  ·  view source on GitHub ↗

Test isolation from system site-packages

(self)

Source from the content-addressed store, hash-verified

440 self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
441
442 def test_isolation(self):
443 """
444 Test isolation from system site-packages
445 """
446 for ssp, s in ((True, 'true'), (False, 'false')):
447 builder = venv.EnvBuilder(clear=True, system_site_packages=ssp)
448 builder.create(self.env_dir)
449 data = self.get_text_file_contents('pyvenv.cfg')
450 self.assertIn('include-system-site-packages = %s\n' % s, data)
451
452 @unittest.skipUnless(can_symlink(), 'Needs symlinks')
453 def test_symlinking(self):

Callers

nothing calls this directly

Calls 3

assertInMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected