summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2023-11-30 18:37:35 +0100
committerGitHub <noreply@github.com>2023-11-30 18:37:35 +0100
commitf3983d60c26a18d5294fdebc6f6ea1b92766a5aa (patch)
tree6af9e319308ac4bda579a0070d6051489a0efef8 /lib
parent40e705d39e8d4ef680f7d4c3295acae216828bc0 (diff)
downloadspack-f3983d60c26a18d5294fdebc6f6ea1b92766a5aa.tar.gz
spack-f3983d60c26a18d5294fdebc6f6ea1b92766a5aa.tar.bz2
spack-f3983d60c26a18d5294fdebc6f6ea1b92766a5aa.tar.xz
spack-f3983d60c26a18d5294fdebc6f6ea1b92766a5aa.zip
tests: add missing mutable db (#41359)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/concretize.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index eba86d14fc..2818aad042 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -203,7 +203,9 @@ class Changing(Package):
# TODO: in case tests using this fixture start failing.
if sys.modules.get("spack.pkg.changing.changing"):
del sys.modules["spack.pkg.changing.changing"]
+ if sys.modules.get("spack.pkg.changing.root"):
del sys.modules["spack.pkg.changing.root"]
+ if sys.modules.get("spack.pkg.changing"):
del sys.modules["spack.pkg.changing"]
# Change the recipe
@@ -1604,7 +1606,9 @@ class TestConcretize:
assert not new_root["changing"].satisfies("@1.0")
@pytest.mark.regression("28259")
- def test_reuse_with_unknown_namespace_dont_raise(self, mock_custom_repository):
+ def test_reuse_with_unknown_namespace_dont_raise(
+ self, temporary_store, mock_custom_repository
+ ):
with spack.repo.use_repositories(mock_custom_repository, override=False):
s = Spec("c").concretized()
assert s.namespace != "builtin.mock"
@@ -1615,8 +1619,8 @@ class TestConcretize:
assert s.namespace == "builtin.mock"
@pytest.mark.regression("28259")
- def test_reuse_with_unknown_package_dont_raise(self, tmpdir, monkeypatch):
- builder = spack.repo.MockRepositoryBuilder(tmpdir, namespace="myrepo")
+ def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, monkeypatch):
+ builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo")
builder.add_package("c")
with spack.repo.use_repositories(builder.root, override=False):
s = Spec("c").concretized()