diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-03-21 23:38:40 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-03-21 23:38:49 +0100 |
commit | 6aae60fb530f7608bc379a57a477e904a816544d (patch) | |
tree | 44a68fb691b7d9aeb0a560b54438f6f7180ce02d /tests/test_parsing.py | |
parent | a77278819e5f9637e8ff1954ec33ecbf753ac89a (diff) | |
download | semantic-version-6aae60fb530f7608bc379a57a477e904a816544d.tar.gz |
Add Python3 support.
Diffstat (limited to 'tests/test_parsing.py')
-rwxr-xr-x | tests/test_parsing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 01c8ae8..585011d 100755 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -63,7 +63,9 @@ class ComparisonTestCase(unittest.TestCase): self.assertTrue(first_ver == second_ver, '%r != %r' % (first_ver, second_ver)) else: self.assertTrue(first_ver > second_ver, '%r !> %r' % (first_ver, second_ver)) - self.assertEqual(cmp(i, j), semantic_version.compare(first, second)) + + cmp_res = -1 if i < j else (1 if i > j else 0) + self.assertEqual(cmp_res, semantic_version.compare(first, second)) if __name__ == '__main__': # pragma: no cover |