From d9cd7b70e2e1724013178ee3a04ce0c01df45937 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Fri, 1 Mar 2019 18:39:24 +0000 Subject: tests: Remove redundant integration pytest markers Remove `pytest.mark.integration` for individual tests that already include it in `pytestmarker` at the top. FWIW the list of such files was found using: git grep --name-only 'pytestmark = pytest.mark.integration' | xargs grep '@pytest.mark.integration' --- tests/integration/artifact.py | 1 - tests/integration/autotools.py | 2 -- tests/integration/make.py | 1 - tests/integration/messages.py | 2 -- tests/integration/sandbox-bwrap.py | 2 -- tests/integration/shell.py | 1 - tests/integration/workspace.py | 6 ------ 7 files changed, 15 deletions(-) (limited to 'tests') diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py index 949d23c70..a375ee253 100644 --- a/tests/integration/artifact.py +++ b/tests/integration/artifact.py @@ -43,7 +43,6 @@ DATA_DIR = os.path.join( # A test to capture the integration of the cachebuildtrees # behaviour, which by default is to include the buildtree # content of an element on caching. -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_cache_buildtrees(cli, tmpdir, datafiles): diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py index 9c49ee9fd..71cb4590f 100644 --- a/tests/integration/autotools.py +++ b/tests/integration/autotools.py @@ -17,7 +17,6 @@ DATA_DIR = os.path.join( # Test that an autotools build 'works' - we use the autotools sample # amhello project for this. -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_autotools_build(cli, datafiles): @@ -40,7 +39,6 @@ def test_autotools_build(cli, datafiles): # Test that an autotools build 'works' - we use the autotools sample # amhello project for this. -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_autotools_confroot_build(cli, datafiles): diff --git a/tests/integration/make.py b/tests/integration/make.py index 3839608f6..01c19ce20 100644 --- a/tests/integration/make.py +++ b/tests/integration/make.py @@ -17,7 +17,6 @@ DATA_DIR = os.path.join( # Test that a make build 'works' - we use the make sample # makehello project for this. -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_make_build(cli, datafiles): diff --git a/tests/integration/messages.py b/tests/integration/messages.py index b4ab3337c..b633eefdf 100644 --- a/tests/integration/messages.py +++ b/tests/integration/messages.py @@ -36,7 +36,6 @@ DATA_DIR = os.path.join( ) -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_disable_message_lines(cli, datafiles): @@ -72,7 +71,6 @@ def test_disable_message_lines(cli, datafiles): assert "Message contains " not in result.stderr -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_disable_error_lines(cli, datafiles): diff --git a/tests/integration/sandbox-bwrap.py b/tests/integration/sandbox-bwrap.py index 206a3c387..b898f5fed 100644 --- a/tests/integration/sandbox-bwrap.py +++ b/tests/integration/sandbox-bwrap.py @@ -19,7 +19,6 @@ DATA_DIR = os.path.join( # Bubblewrap sandbox doesn't remove the dirs it created during its execution, # so BuildStream tries to remove them to do good. BuildStream should be extra # careful when those folders already exist and should not touch them, though. -@pytest.mark.integration @pytest.mark.skipif(not HAVE_BWRAP, reason='Only available with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_sandbox_bwrap_cleanup_build(cli, datafiles): @@ -43,7 +42,6 @@ def test_sandbox_bwrap_distinguish_setup_error(cli, datafiles): result.assert_task_error(error_domain=ErrorDomain.SANDBOX, error_reason="bwrap-sandbox-fail") -@pytest.mark.integration @pytest.mark.skipif(not HAVE_BWRAP, reason='Only available with bubblewrap') @pytest.mark.datafiles(DATA_DIR) def test_sandbox_bwrap_return_subprocess(cli, datafiles): diff --git a/tests/integration/shell.py b/tests/integration/shell.py index 1a10df59e..3246d108a 100644 --- a/tests/integration/shell.py +++ b/tests/integration/shell.py @@ -281,7 +281,6 @@ def test_cli_mount(cli, datafiles, path): # Test that we can see the workspace files in a shell -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_visible(cli, datafiles): diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py index 88a4a1f84..fd2aff3ac 100644 --- a/tests/integration/workspace.py +++ b/tests/integration/workspace.py @@ -15,7 +15,6 @@ DATA_DIR = os.path.join( ) -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_mount(cli, datafiles): @@ -32,7 +31,6 @@ def test_workspace_mount(cli, datafiles): assert os.path.exists(os.path.join(cli.directory, 'workspace')) -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_commanddir(cli, datafiles): @@ -50,7 +48,6 @@ def test_workspace_commanddir(cli, datafiles): assert os.path.exists(os.path.join(cli.directory, 'workspace', 'build')) -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_updated_dependency(cli, datafiles): @@ -105,7 +102,6 @@ def test_workspace_updated_dependency(cli, datafiles): assert res.output == 'Hello china!\n\n' -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_update_dependency_failed(cli, datafiles): @@ -181,7 +177,6 @@ def test_workspace_update_dependency_failed(cli, datafiles): assert res.output == 'Hello world!\nHello spain!\n\n' -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_updated_dependency_nested(cli, datafiles): @@ -235,7 +230,6 @@ def test_updated_dependency_nested(cli, datafiles): assert res.output == 'Hello world!\nHello test!\n\n' -@pytest.mark.integration @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_incremental_configure_commands_run_only_once(cli, datafiles): -- cgit v1.2.1