summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-02-25 14:39:24 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-03-04 18:13:34 +0100
commit80a6eab2db340f0f666f416588a31c7c4d36919d (patch)
tree5f8b567bb6d08f3ebc736d6e3be36237b22a540f
parent916da02326854c89dad789e17fb07b23eede5fa3 (diff)
downloadspack-80a6eab2db340f0f666f416588a31c7c4d36919d.tar.gz
spack-80a6eab2db340f0f666f416588a31c7c4d36919d.tar.bz2
spack-80a6eab2db340f0f666f416588a31c7c4d36919d.tar.xz
spack-80a6eab2db340f0f666f416588a31c7c4d36919d.zip
Add a test
-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 587295d01a..93697fedda 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