Пример #1
0
 def test_get_standard_plugins_path(self):
     path = plugin.get_standard_plugins_path()
     for directory in path:
         self.assertNotContainsRe(directory, r'\\/$')
     try:
         from distutils.sysconfig import get_python_lib
     except ImportError:
         pass
     else:
         if sys.platform != 'win32':
             python_lib = get_python_lib()
             for directory in path:
                 if directory.startswith(python_lib):
                     break
             else:
                 self.fail('No path to global plugins')
Пример #2
0
 def test_get_standard_plugins_path(self):
     path = plugin.get_standard_plugins_path()
     for directory in path:
         self.assertNotContainsRe(directory, r'\\/$')
     try:
         from distutils.sysconfig import get_python_lib
     except ImportError:
         pass
     else:
         if sys.platform != 'win32':
             python_lib = get_python_lib()
             for directory in path:
                 if directory.startswith(python_lib):
                     break
             else:
                 self.fail('No path to global plugins')
Пример #3
0
 def check_path(self, expected_dirs, setting_dirs):
     if setting_dirs:
         self._set_path(*setting_dirs)
     actual = plugin.get_standard_plugins_path()
     self.assertEqual(self._list2paths(*expected_dirs), actual)
Пример #4
0
 def test_load_plugins_default(self):
     plugin.load_plugins()
     path = plugin.get_standard_plugins_path()
     self.assertEqual(path, bzrlib.plugins.__path__)
Пример #5
0
 def test_get_standard_plugins_path_env(self):
     self.overrideEnv('BZR_PLUGIN_PATH', 'foo/')
     path = plugin.get_standard_plugins_path()
     for directory in path:
         self.assertNotContainsRe(directory, r'\\/$')
Пример #6
0
 def test_set_plugins_path_defaults(self):
     plugin.set_plugins_path()
     self.assertEqual(plugin.get_standard_plugins_path(),
                      bzrlib.plugins.__path__)
Пример #7
0
 def check_path(self, expected_dirs, setting_dirs):
     if setting_dirs:
         self._set_path(*setting_dirs)
     actual = plugin.get_standard_plugins_path()
     self.assertEquals(self._list2paths(*expected_dirs), actual)
Пример #8
0
 def test_load_plugins_default(self):
     plugin.load_plugins()
     path = plugin.get_standard_plugins_path()
     self.assertEqual(path, bzrlib.plugins.__path__)
Пример #9
0
 def test_get_standard_plugins_path_env(self):
     self.overrideEnv('BZR_PLUGIN_PATH', 'foo/')
     path = plugin.get_standard_plugins_path()
     for directory in path:
         self.assertNotContainsRe(directory, r'\\/$')
Пример #10
0
 def test_set_plugins_path_defaults(self):
     plugin.set_plugins_path()
     self.assertEqual(plugin.get_standard_plugins_path(),
                      bzrlib.plugins.__path__)