def test_balrog_release_implements_remaining_comparision_operators(): assert BalrogReleaseName.parse( 'firefox-32.0-build1') == BalrogReleaseName.parse( 'firefox-32.0-build1') assert BalrogReleaseName.parse( 'firefox-32.0-build1') != BalrogReleaseName.parse( 'firefox-33.0-build1') assert BalrogReleaseName.parse( 'firefox-32.0-build1') <= BalrogReleaseName.parse( 'firefox-32.0-build1') assert BalrogReleaseName.parse( 'firefox-32.0-build1') <= BalrogReleaseName.parse( 'firefox-33.0-build1') assert BalrogReleaseName.parse( 'firefox-33.0-build1') >= BalrogReleaseName.parse( 'firefox-32.0-build1') assert BalrogReleaseName.parse( 'firefox-33.0-build1') >= BalrogReleaseName.parse( 'firefox-33.0-build1') assert BalrogReleaseName.parse( 'firefox-33.0-build1') > BalrogReleaseName.parse('firefox-32.0-build1') assert not BalrogReleaseName.parse( 'firefox-33.0-build1') > BalrogReleaseName.parse('firefox-33.0-build1') assert not BalrogReleaseName.parse( 'firefox-32.0-build1') < BalrogReleaseName.parse('firefox-32.0-build1') assert BalrogReleaseName.parse( 'firefox-33.0-build1') != BalrogReleaseName.parse( 'firefox-32.0-build1')
def test_fail_balrog_release_lt_operator(): with pytest.raises(ValueError): assert BalrogReleaseName.parse( 'thunderbird-32.0-build1') < BalrogReleaseName.parse( 'Firefox-32.0-build2')
def test_firefox_version_raises_when_invalid_version_is_given( string, ExpectedErrorType): with pytest.raises(ExpectedErrorType): BalrogReleaseName.parse(string)
def test_balrog_release_implements_lt_operator(previous, next): assert BalrogReleaseName.parse(previous) < BalrogReleaseName.parse(next)
def test_balrog_release_name_parse(string, expected_string): assert str(BalrogReleaseName.parse(string)) == expected_string