Пример #1
0
 def test_user_similar(self):
     # Issue #8759: make sure the posix scheme for the users
     # is similar to the global posix_prefix one
     base = get_config_var("base")
     user = get_config_var("userbase")
     # the global scheme mirrors the distinction between prefix and
     # exec-prefix but not the user scheme, so we have to adapt the paths
     # before comparing (issue #9100)
     adapt = sys.prefix != sys.exec_prefix
     for name in ("stdlib", "platstdlib", "purelib", "platlib"):
         global_path = get_path(name, "posix_prefix")
         if adapt:
             global_path = global_path.replace(sys.exec_prefix, sys.prefix)
             base = base.replace(sys.exec_prefix, sys.prefix)
         user_path = get_path(name, "posix_user")
         self.assertEqual(user_path, global_path.replace(base, user, 1))
Пример #2
0
 def test_user_similar(self):
     # Issue #8759: make sure the posix scheme for the users
     # is similar to the global posix_prefix one
     base = get_config_var('base')
     user = get_config_var('userbase')
     # the global scheme mirrors the distinction between prefix and
     # exec-prefix but not the user scheme, so we have to adapt the paths
     # before comparing (issue #9100)
     adapt = sys.prefix != sys.exec_prefix
     for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
         global_path = get_path(name, 'posix_prefix')
         if adapt:
             global_path = global_path.replace(sys.exec_prefix, sys.prefix)
             base = base.replace(sys.exec_prefix, sys.prefix)
         user_path = get_path(name, 'posix_user')
         self.assertEqual(user_path, global_path.replace(base, user, 1))
Пример #3
0
 def test_get_path(self):
     # XXX make real tests here
     for scheme in _SCHEMES.sections():
         for name, _ in _SCHEMES.items(scheme):
             res = get_path(name, scheme)
Пример #4
0
 def test_get_path(self):
     # XXX make real tests here
     for scheme in _SCHEMES.sections():
         for name, _ in _SCHEMES.items(scheme):
             res = get_path(name, scheme)