Added tests with mutiple tags & tags out of order
This commit is contained in:
parent
702ec78352
commit
33d8615f16
@ -74,6 +74,35 @@ class TestGetTagVersion(unittest.TestCase):
|
||||
subprocess.call(['git', 'tag', '1.0.0'])
|
||||
tag = get_version.get_tag_version()
|
||||
self.assertEqual(tag, "1.0.0")
|
||||
def test_get_version_multiple(self):
|
||||
create_git_environment()
|
||||
subprocess.call(['git', 'tag', '0.1.0'])
|
||||
subprocess.call(['git', 'tag', '0.1.1'])
|
||||
subprocess.call(['git', 'tag', '0.1.2'])
|
||||
subprocess.call(['git', 'tag', '0.1.3'])
|
||||
subprocess.call(['git', 'tag', '0.2.0'])
|
||||
subprocess.call(['git', 'tag', '0.3.0'])
|
||||
subprocess.call(['git', 'tag', '0.3.1'])
|
||||
subprocess.call(['git', 'tag', '1.0.0'])
|
||||
subprocess.call(['git', 'tag', '1.1.0'])
|
||||
subprocess.call(['git', 'tag', '1.2.0'])
|
||||
subprocess.call(['git', 'tag', '1.2.1'])
|
||||
tag = get_version.get_tag_version()
|
||||
self.assertEqual(tag, "1.2.1")
|
||||
def test_get_version_out_of_order(self):
|
||||
subprocess.call(['git', 'tag', '0.1.0'])
|
||||
subprocess.call(['git', 'tag', '0.1.1'])
|
||||
subprocess.call(['git', 'tag', '0.5.2'])
|
||||
subprocess.call(['git', 'tag', '0.1.3'])
|
||||
subprocess.call(['git', 'tag', '8.1.0'])
|
||||
subprocess.call(['git', 'tag', '0.3.8'])
|
||||
subprocess.call(['git', 'tag', '3.3.1'])
|
||||
subprocess.call(['git', 'tag', '1.4.0'])
|
||||
subprocess.call(['git', 'tag', '1.1.7'])
|
||||
subprocess.call(['git', 'tag', '1.2.0'])
|
||||
subprocess.call(['git', 'tag', '0.2.1'])
|
||||
tag = get_version.get_tag_version()
|
||||
self.assertEqual(tag, "8.1.0")
|
||||
def test_default_get_version_tag(self):
|
||||
create_git_environment()
|
||||
tag = get_version.get_tag_version()
|
||||
|
Loading…
Reference in New Issue
Block a user