From f749821dc25c0c2b72a3f1d60550e23eca109d9f Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Thu, 25 Jul 2019 09:48:06 -0600 Subject: [PATCH] Pep8 Compliance --- lib/spack/spack/test/database.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index 356c77c0e6d..479422dcb52 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -38,13 +38,20 @@ def test_store(tmpdir): spack.store.store = real_store + @pytest.fixture() def test_global_db_initializtion(): + global_store = spack.store.store global_db_path = '$spack/opt/spack' global_db_path = spack.util.path.canonicalize_path(global_db_path) shutil.rmtree(os.path.join(global_db_path, '.spack-db')) global_store = spack.store.Store(str(global_db_path)) + yield + + spack.store.store = global_store + + @pytest.fixture() def upstream_and_downstream_db(tmpdir_factory, gen_mock_layout): mock_db_root = str(tmpdir_factory.mktemp('mock_db_root'))