def test_full_rev(self): expected = version_info(0, 1, None, (0, 1), (0, 1, None), '0.1.0dev0+1.g0123456789abcdef', ('0', '1', '0dev0+1', 'g0123456789abcdef'), 'g0123456789abcdef') received = generate_version_info('0.1.0dev0+1.g0123456789abcdef') self.assertEqual(received, expected)
def test_major_minor_patch(self): expected = version_info(0, 1, 0, (0, 1), (0, 1, 0), "0.1.0", ('0', '1', '0'), None) received = generate_version_info("0.1.0") self.assertEqual(received, expected)
def test_dev(self): expected = version_info(0, 1, None, (0, 1), (0, 1, None), '0.1.0dev0', ('0', '1', '0dev0'), None) received = generate_version_info('0.1.0dev0') self.assertEqual(received, expected)
def test_unknown(self): expected = version_info(None, None, None, (None, None), (None, None, None), '0+unknown', ('0+unknown', ), None) received = generate_version_info('0+unknown') self.assertEqual(received, expected)