Пример #1
0
 def test_version_no_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = pip_common.Version("1.2.3")
     plugin_module.pyb_version = ">=1.2.5"
     self.assertRaises(IncompatiblePluginException, _check_plugin_version,
                       plugin_module, "test plugin")
Пример #2
0
 def test_version_compatible_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = pip_common.Version("1.2.3")
     plugin_module.pyb_version = "~=1.2"
     _check_plugin_version(plugin_module, "test plugin")
Пример #3
0
 def test_version_multiple_specifier_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = pip_common.Version("1.2.3")
     plugin_module.pyb_version = ">=1.2.0,<=1.2.4"
     _check_plugin_version(plugin_module, "test plugin")
Пример #4
0
 def test_version_no_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = Version("1.2.3")
     plugin_module.pyb_version = ">=1.2.5"
     self.assertRaises(IncompatiblePluginException, _check_plugin_version, plugin_module, "test plugin")
Пример #5
0
 def test_version_multiple_specifier_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = Version("1.2.3")
     plugin_module.pyb_version = ">=1.2.0,<=1.2.4"
     _check_plugin_version(plugin_module, "test plugin")
Пример #6
0
 def test_version_compatible_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = Version("1.2.3")
     plugin_module.pyb_version = "~=1.2"
     _check_plugin_version(plugin_module, "test plugin")
Пример #7
0
 def test_version_exact_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = Version("1.2.3")
     plugin_module.pyb_version = "===1.2.3"
     _check_plugin_version(plugin_module, "test plugin")
Пример #8
0
 def test_version_exact_match(self):
     plugin_module = Mock()
     pluginloader.PYB_VERSION = Version("1.2.3")
     plugin_module.pyb_version = "===1.2.3"
     _check_plugin_version(plugin_module, "test plugin")