From afb3f4ff2021c795c7563ab70321a7cfbd0f0104 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 25 Feb 2022 14:39:24 +0100 Subject: Add a test --- lib/spack/spack/test/versions.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index aec9402243..d911b7a6a1 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -630,6 +630,14 @@ def test_version_wrong_idx_type(): v['0:'] +@pytest.mark.regression('29170') +def test_version_range_satisfies_means_nonempty_intersection(): + x = VersionRange('3.7.0', '3') + y = VersionRange('3.6.0', '3.6.0') + assert not x.satisfies(y) + assert not y.satisfies(x) + + @pytest.mark.regression('26482') def test_version_list_with_range_included_in_concrete_version_interpreted_as_range(): # Note: this test only tests whether we can construct a version list of a range -- cgit v1.2.3-60-g2f50