summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-02-25 14:39:24 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-04-14 11:08:17 +0200
commitafb3f4ff2021c795c7563ab70321a7cfbd0f0104 (patch)
treebcce64ff204b439ada38694ae7a53c334a349f61 /lib
parent9d8e411d76d43c4a1a86cfd3fd29cc8bc235700c (diff)
downloadspack-afb3f4ff2021c795c7563ab70321a7cfbd0f0104.tar.gz
spack-afb3f4ff2021c795c7563ab70321a7cfbd0f0104.tar.bz2
spack-afb3f4ff2021c795c7563ab70321a7cfbd0f0104.tar.xz
spack-afb3f4ff2021c795c7563ab70321a7cfbd0f0104.zip
Add a test
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/versions.py8
1 files changed, 8 insertions, 0 deletions
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