Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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")