From 78850f38eb8b361557250f4212e1d92b0ae741d8 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 12 Aug 2021 14:08:53 +0200 Subject: Fix typos in fixture use. Mention fixtures in pytest.ini (#25381) --- lib/spack/spack/test/config_values.py | 4 ++-- pytest.ini | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/config_values.py b/lib/spack/spack/test/config_values.py index 367138f098..4933c5b95f 100644 --- a/lib/spack/spack/test/config_values.py +++ b/lib/spack/spack/test/config_values.py @@ -9,7 +9,7 @@ import spack.store @pytest.mark.parametrize('hash_length', [1, 2, 3, 4, 5, 9]) -@pytest.mark.use_fixtures('mock_packages') +@pytest.mark.usefixtures('mock_packages') def test_set_install_hash_length(hash_length, mutable_config, tmpdir): mutable_config.set('config:install_hash_length', hash_length) mutable_config.set('config:install_tree', {'root': str(tmpdir)}) @@ -24,7 +24,7 @@ def test_set_install_hash_length(hash_length, mutable_config, tmpdir): assert len(hash_str) == hash_length -@pytest.mark.use_fixtures('mock_packages') +@pytest.mark.usefixtures('mock_packages') def test_set_install_hash_length_upper_case(mutable_config, tmpdir): mutable_config.set('config:install_hash_length', 5) mutable_config.set( diff --git a/pytest.ini b/pytest.ini index 71f563954a..c381e07061 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,3 +7,8 @@ markers = db: tests that require creating a DB maybeslow: tests that may be slow (e.g. access a lot the filesystem, etc.) regression: tests that fix a reported bug + requires_executables: tests that requires certain executables in PATH to run + nomockstage: use a stage area specifically created for this test, instead of relying on a common mock stage + enable_compiler_verification: enable compiler verification within unit tests + enable_compiler_link_paths: verifies compiler link paths within unit tests + disable_clean_stage_check: avoid failing tests if there are leftover files in the stage area -- cgit v1.2.3-60-g2f50