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")
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")
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")
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")
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")
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")
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")