Refactor the version info to use a tuple, always.

This commit is contained in:
Dave Halter
2017-07-19 09:09:33 +02:00
parent dc3b3158eb
commit 78c371f73a
7 changed files with 74 additions and 45 deletions

View File

@@ -14,7 +14,7 @@ def test_load_inexisting_grammar():
@pytest.mark.parametrize(('string', 'result'), [
('2', 27), ('3', 36), ('1.1', 11), ('1.1.1', 11), ('300.1.31', 3001)
('2', (2, 7)), ('3', (3, 6)), ('1.1', (1, 1)), ('1.1.1', (1, 1)), ('300.1.31', (300, 1))
])
def test_parse_version(string, result):
assert utils._parse_version(string) == result