354
354
self.assertEqual("unknown", plugin.__version__)
356
356
def test___version__with_version_info(self):
357
self.setup_plugin("version_info = (1, 2, 3, 'dev', 4)")
358
plugin = bzrlib.plugin.plugins()['plugin']
359
self.assertEqual("1.2.3dev4", plugin.__version__)
357
self.setup_plugin("version_info = (1, 2, 3, 'candidate', 1)")
358
plugin = bzrlib.plugin.plugins()['plugin']
359
self.assertEqual("1.2.3rc1", plugin.__version__)
361
def test_dev__version__with_version_info(self):
362
self.setup_plugin("version_info = (1, 2, 3, 'dev', 0)")
363
plugin = bzrlib.plugin.plugins()['plugin']
364
self.assertEqual("1.2.3dev", plugin.__version__)
361
366
def test_final__version__with_version_info(self):
362
self.setup_plugin("version_info = (1, 2, 3, 'final', 4)")
367
self.setup_plugin("version_info = (1, 2, 3, 'final', 0)")
363
368
plugin = bzrlib.plugin.plugins()['plugin']
364
369
self.assertEqual("1.2.3", plugin.__version__)