diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
commit | a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 (patch) | |
tree | 54617b4f5f04ee87a2c9e3b97cc88b8626859124 /python/mozrelease/test | |
parent | Releasing progress-linux version 115.7.0esr-1~deb12u1progress7u1. (diff) | |
download | firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.tar.xz firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.zip |
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'python/mozrelease/test')
-rw-r--r-- | python/mozrelease/test/test_versions.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/python/mozrelease/test/test_versions.py b/python/mozrelease/test/test_versions.py index f3bca91f1f..eaf7d653db 100644 --- a/python/mozrelease/test/test_versions.py +++ b/python/mozrelease/test/test_versions.py @@ -1,7 +1,11 @@ import mozunit import pytest -from mozrelease.versions import MozillaVersion +from mozrelease.versions import ( + AncientMozillaVersion, + ModernMozillaVersion, + MozillaVersion, +) ALL_VERSIONS = [ # Keep this sorted "3.0", @@ -91,6 +95,21 @@ def test_versions_compare_greater(comparable_versions): assert MozillaVersion(larger_version) > MozillaVersion(smaller_version) +def test_ModernMozillaVersion(): + """Test properties specific to ModernMozillaVersion""" + assert isinstance(MozillaVersion("1.2.4"), ModernMozillaVersion) + assert isinstance(MozillaVersion("1.2.4rc3"), ModernMozillaVersion) + assert MozillaVersion("1.2rc3") == MozillaVersion("1.2.0rc3") + + +def test_AncientMozillaVersion(): + """Test properties specific to AncientMozillaVersion""" + assert isinstance(MozillaVersion("1.2.0.4"), AncientMozillaVersion) + assert isinstance(MozillaVersion("1.2.0.4pre1"), AncientMozillaVersion) + assert MozillaVersion("1.2pre1") == MozillaVersion("1.2.0pre1") + assert MozillaVersion("1.2.0.4pre1") == MozillaVersion("1.2.4pre1") + + @pytest.mark.parametrize("version", ALL_VERSIONS) def test_versions_compare_equal(version): """Test that versions properly compare as equal through multiple passes.""" |