tests: add missing mutable db (#41359)
This commit is contained in:
parent
37f65e769c
commit
f1b2515ce1
1 changed files with 7 additions and 3 deletions
|
@ -203,7 +203,9 @@ def change(self, changes=None):
|
||||||
# TODO: in case tests using this fixture start failing.
|
# TODO: in case tests using this fixture start failing.
|
||||||
if sys.modules.get("spack.pkg.changing.changing"):
|
if sys.modules.get("spack.pkg.changing.changing"):
|
||||||
del sys.modules["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"]
|
del sys.modules["spack.pkg.changing.root"]
|
||||||
|
if sys.modules.get("spack.pkg.changing"):
|
||||||
del sys.modules["spack.pkg.changing"]
|
del sys.modules["spack.pkg.changing"]
|
||||||
|
|
||||||
# Change the recipe
|
# Change the recipe
|
||||||
|
@ -1604,7 +1606,9 @@ def test_installed_version_is_selected_only_for_reuse(
|
||||||
assert not new_root["changing"].satisfies("@1.0")
|
assert not new_root["changing"].satisfies("@1.0")
|
||||||
|
|
||||||
@pytest.mark.regression("28259")
|
@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):
|
with spack.repo.use_repositories(mock_custom_repository, override=False):
|
||||||
s = Spec("c").concretized()
|
s = Spec("c").concretized()
|
||||||
assert s.namespace != "builtin.mock"
|
assert s.namespace != "builtin.mock"
|
||||||
|
@ -1615,8 +1619,8 @@ def test_reuse_with_unknown_namespace_dont_raise(self, mock_custom_repository):
|
||||||
assert s.namespace == "builtin.mock"
|
assert s.namespace == "builtin.mock"
|
||||||
|
|
||||||
@pytest.mark.regression("28259")
|
@pytest.mark.regression("28259")
|
||||||
def test_reuse_with_unknown_package_dont_raise(self, tmpdir, monkeypatch):
|
def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, monkeypatch):
|
||||||
builder = spack.repo.MockRepositoryBuilder(tmpdir, namespace="myrepo")
|
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo")
|
||||||
builder.add_package("c")
|
builder.add_package("c")
|
||||||
with spack.repo.use_repositories(builder.root, override=False):
|
with spack.repo.use_repositories(builder.root, override=False):
|
||||||
s = Spec("c").concretized()
|
s = Spec("c").concretized()
|
||||||
|
|
Loading…
Reference in a new issue