def test_version_int(): """Tests that version_int. Corrects our versions.""" eq_(version_int('3.5.0a1pre2'), 3050000001002) eq_(version_int(''), 200100) eq_(version_int('0'), 200100) eq_(version_int('*'), 99000000200100) eq_(version_int(MAXVERSION), MAXVERSION) eq_(version_int(MAXVERSION + 1), MAXVERSION) eq_(version_int('9999999'), MAXVERSION)
def test_version_int_unicode(): eq_(version_int(u'\u2322 ugh stephend'), 200100)
def test_version_asterix_compare(): eq_(version_int('*'), version_int('99')) assert version_int('98.*') < version_int('*') eq_(version_int('5.*'), version_int('5.99')) assert version_int('5.*') > version_int('5.0.*')
def test_version_int_compare(): eq_(version_int('3.6.*'), version_int('3.6.99')) assert version_int('3.6.*') > version_int('3.6.8')