summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-02-28 19:35:18 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-01 19:05:30 +0000
commit402cc7af5464f34d29909148dfb0876e56f97124 (patch)
tree2004c4888e528db25172ecb116d23713d3469873
parentd6d33c94751bd47ca77d2b2e4ac246a2dd1328a6 (diff)
downloadbuildstream-402cc7af5464f34d29909148dfb0876e56f97124.tar.gz
tests: Remove unused parameters in functions
For parameters that are required as part of an API, prefix them by "_" to make it clear they are unused
-rw-r--r--tests/artifactcache/expiry.py16
-rw-r--r--tests/artifactcache/push.py2
-rw-r--r--tests/elements/filter.py4
-rw-r--r--tests/examples/autotools.py4
-rw-r--r--tests/examples/developing.py4
-rw-r--r--tests/examples/first-project.py2
-rw-r--r--tests/examples/flatpak-autotools.py4
-rw-r--r--tests/examples/integration-commands.py4
-rw-r--r--tests/examples/junctions.py4
-rw-r--r--tests/examples/running-commands.py4
-rw-r--r--tests/format/junctions.py4
-rw-r--r--tests/format/project.py2
-rw-r--r--tests/format/variables.py12
-rw-r--r--tests/frontend/artifact.py2
-rw-r--r--tests/frontend/buildcheckout.py2
-rw-r--r--tests/frontend/completions.py2
-rw-r--r--tests/frontend/fetch.py4
-rw-r--r--tests/frontend/logging.py2
-rw-r--r--tests/frontend/mirror.py12
-rw-r--r--tests/frontend/order.py2
-rw-r--r--tests/frontend/pull.py2
-rw-r--r--tests/frontend/show.py4
-rw-r--r--tests/frontend/track.py4
-rw-r--r--tests/frontend/track_cross_junction.py4
-rw-r--r--tests/frontend/workspace.py2
-rw-r--r--tests/integration/autotools.py6
-rw-r--r--tests/integration/build-uid.py6
-rw-r--r--tests/integration/cachedfail.py6
-rw-r--r--tests/integration/cmake.py6
-rw-r--r--tests/integration/compose.py2
-rw-r--r--tests/integration/import.py2
-rw-r--r--tests/integration/make.py4
-rw-r--r--tests/integration/manual.py8
-rw-r--r--tests/integration/messages.py4
-rw-r--r--tests/integration/pip_element.py6
-rw-r--r--tests/integration/pip_source.py4
-rw-r--r--tests/integration/pullbuildtrees.py2
-rw-r--r--tests/integration/sandbox-bwrap.py6
-rw-r--r--tests/integration/script.py16
-rw-r--r--tests/integration/shell.py26
-rw-r--r--tests/integration/shellbuildtrees.py10
-rw-r--r--tests/integration/sockets.py4
-rw-r--r--tests/integration/stack.py2
-rw-r--r--tests/integration/symlinks.py6
-rw-r--r--tests/integration/workspace.py12
-rw-r--r--tests/internals/storage_vdir_import.py8
-rw-r--r--tests/sandboxes/missing-command.py2
-rw-r--r--tests/sources/local.py10
-rw-r--r--tests/sources/patch.py12
-rw-r--r--tests/sources/pip.py14
-rw-r--r--tests/sources/previous_source_access.py2
-rw-r--r--tests/sources/tar.py2
-rw-r--r--tests/testutils/artifactshare.py2
-rw-r--r--tests/testutils/setuptools.py2
54 files changed, 152 insertions, 148 deletions
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py
index 14cbd8791..25e67414e 100644
--- a/tests/artifactcache/expiry.py
+++ b/tests/artifactcache/expiry.py
@@ -39,7 +39,7 @@ DATA_DIR = os.path.join(
# Ensure that the cache successfully removes an old artifact if we do
# not have enough space left.
@pytest.mark.datafiles(DATA_DIR)
-def test_artifact_expires(cli, datafiles, tmpdir):
+def test_artifact_expires(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
@@ -81,7 +81,7 @@ def test_artifact_expires(cli, datafiles, tmpdir):
(399999)
])
@pytest.mark.datafiles(DATA_DIR)
-def test_artifact_too_large(cli, datafiles, tmpdir, size):
+def test_artifact_too_large(cli, datafiles, size):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
@@ -99,7 +99,7 @@ def test_artifact_too_large(cli, datafiles, tmpdir, size):
@pytest.mark.datafiles(DATA_DIR)
-def test_expiry_order(cli, datafiles, tmpdir):
+def test_expiry_order(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
checkout = os.path.join(project, 'workspace')
@@ -156,7 +156,7 @@ def test_expiry_order(cli, datafiles, tmpdir):
# in the current build pipeline, because that would be embarassing,
# wouldn't it?
@pytest.mark.datafiles(DATA_DIR)
-def test_keep_dependencies(cli, datafiles, tmpdir):
+def test_keep_dependencies(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
@@ -202,7 +202,7 @@ def test_keep_dependencies(cli, datafiles, tmpdir):
# Assert that we never delete a dependency required for a build tree
@pytest.mark.datafiles(DATA_DIR)
-def test_never_delete_required(cli, datafiles, tmpdir):
+def test_never_delete_required(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
@@ -254,7 +254,7 @@ def test_never_delete_required(cli, datafiles, tmpdir):
# artifacts we do not require, and the new build is run with dynamic tracking.
#
@pytest.mark.datafiles(DATA_DIR)
-def test_never_delete_required_track(cli, datafiles, tmpdir):
+def test_never_delete_required_track(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
@@ -344,7 +344,7 @@ def test_never_delete_required_track(cli, datafiles, tmpdir):
("70%", 'warning', 'Your system does not have enough available')
])
@pytest.mark.datafiles(DATA_DIR)
-def test_invalid_cache_quota(cli, datafiles, tmpdir, quota, err_domain, err_reason):
+def test_invalid_cache_quota(cli, datafiles, quota, err_domain, err_reason):
project = os.path.join(datafiles.dirname, datafiles.basename)
os.makedirs(os.path.join(project, 'elements'))
@@ -395,7 +395,7 @@ def test_invalid_cache_quota(cli, datafiles, tmpdir, quota, err_domain, err_reas
# the cache size and cleanup jobs are run before any other jobs.
#
@pytest.mark.datafiles(DATA_DIR)
-def test_cleanup_first(cli, datafiles, tmpdir):
+def test_cleanup_first(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = 'elements'
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py
index 6ad7f849f..a122c3c70 100644
--- a/tests/artifactcache/push.py
+++ b/tests/artifactcache/push.py
@@ -245,7 +245,7 @@ def _test_push_directory(user_config_file, project_dir, artifact_digest, queue):
@pytest.mark.datafiles(DATA_DIR)
-def test_push_message(cli, tmpdir, datafiles):
+def test_push_message(tmpdir, datafiles):
project_dir = str(datafiles)
# Set up an artifact cache.
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 2667bc6d9..ec9c8d627 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -118,7 +118,7 @@ def test_filter_workspace_open(datafiles, cli, tmpdir):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_filter_workspace_open_multi(datafiles, cli, tmpdir):
+def test_filter_workspace_open_multi(datafiles, cli):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(cwd=project, project=project, args=['workspace', 'open', 'deps-permitted.bst',
'output-orphans.bst'])
@@ -488,7 +488,7 @@ def test_filter_include_with_indirect_deps(datafiles, cli, tmpdir):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_filter_fails_for_nonexisting_domain(datafiles, cli, tmpdir):
+def test_filter_fails_for_nonexisting_domain(datafiles, cli):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'output-include-nonexistent-domain.bst'])
result.assert_main_error(ErrorDomain.STREAM, None)
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index 96827ff4c..d653cdcd2 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_autotools_build(cli, tmpdir, datafiles):
+def test_autotools_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
@@ -40,7 +40,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_autotools_run(cli, tmpdir, datafiles):
+def test_autotools_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index 3ef78fd36..a5e3c2d9a 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -18,7 +18,7 @@ DATA_DIR = os.path.join(
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_autotools_build(cli, tmpdir, datafiles):
+def test_autotools_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
@@ -39,7 +39,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_run_unmodified_hello(cli, tmpdir, datafiles):
+def test_run_unmodified_hello(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py
index 35839770c..efbea4d0c 100644
--- a/tests/examples/first-project.py
+++ b/tests/examples/first-project.py
@@ -16,7 +16,7 @@ DATA_DIR = os.path.join(
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
-def test_first_project_build_checkout(cli, tmpdir, datafiles):
+def test_first_project_build_checkout(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 454b8d0bb..44b0ef93d 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -36,7 +36,7 @@ def workaround_setuptools_bug(project):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
@pytest.mark.datafiles(DATA_DIR)
-def test_autotools_build(cli, tmpdir, datafiles):
+def test_autotools_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
workaround_setuptools_bug(project)
@@ -59,7 +59,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
@pytest.mark.datafiles(DATA_DIR)
-def test_autotools_run(cli, tmpdir, datafiles):
+def test_autotools_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workaround_setuptools_bug(project)
diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py
index aabf56220..72869dde1 100644
--- a/tests/examples/integration-commands.py
+++ b/tests/examples/integration-commands.py
@@ -16,7 +16,7 @@ DATA_DIR = os.path.join(
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_integration_commands_build(cli, tmpdir, datafiles):
+def test_integration_commands_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
@@ -28,7 +28,7 @@ def test_integration_commands_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_integration_commands_run(cli, tmpdir, datafiles):
+def test_integration_commands_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py
index 3992b1520..e05fbf322 100644
--- a/tests/examples/junctions.py
+++ b/tests/examples/junctions.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_build(cli, tmpdir, datafiles):
+def test_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'callHello.bst'])
@@ -29,7 +29,7 @@ def test_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_shell_call_hello(cli, tmpdir, datafiles):
+def test_shell_call_hello(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'callHello.bst'])
diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py
index 1fad3e651..41a0e4cf0 100644
--- a/tests/examples/running-commands.py
+++ b/tests/examples/running-commands.py
@@ -16,7 +16,7 @@ DATA_DIR = os.path.join(
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_running_commands_build(cli, tmpdir, datafiles):
+def test_running_commands_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
@@ -28,7 +28,7 @@ def test_running_commands_build(cli, tmpdir, datafiles):
reason='Examples are writtent for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_running_commands_run(cli, tmpdir, datafiles):
+def test_running_commands_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'hello.bst'])
diff --git a/tests/format/junctions.py b/tests/format/junctions.py
index 699c4675f..2c200b039 100644
--- a/tests/format/junctions.py
+++ b/tests/format/junctions.py
@@ -49,7 +49,7 @@ def test_simple_build(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_build_of_same_junction_used_twice(cli, tmpdir, datafiles):
+def test_build_of_same_junction_used_twice(cli, datafiles):
project = os.path.join(str(datafiles), 'inconsistent-names')
# Check we can build a project that contains the same junction
@@ -271,7 +271,7 @@ def test_git_build(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_cross_junction_names(cli, tmpdir, datafiles):
+def test_cross_junction_names(cli, datafiles):
project = os.path.join(str(datafiles), 'foo')
copy_subprojects(project, datafiles, ['base'])
diff --git a/tests/format/project.py b/tests/format/project.py
index 4a3055c08..c746409bb 100644
--- a/tests/format/project.py
+++ b/tests/format/project.py
@@ -190,7 +190,7 @@ def test_plugin_no_load_ref(cli, datafiles, ref_storage):
@pytest.mark.datafiles(DATA_DIR)
-def test_plugin_preflight_error(cli, datafiles, tmpdir):
+def test_plugin_preflight_error(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename, 'plugin-preflight-error')
result = cli.run(project=project, args=['source', 'fetch', 'error.bst'])
result.assert_main_error(ErrorDomain.SOURCE, "the-preflight-error")
diff --git a/tests/format/variables.py b/tests/format/variables.py
index 5a0d21206..3fa0f4790 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -37,7 +37,7 @@ def print_warning(msg):
('qmake.bst', 'make-install', "make -j1 INSTALL_ROOT=\"/buildstream-install\" install"),
])
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'defaults'))
-def test_defaults(cli, datafiles, tmpdir, target, varname, expected):
+def test_defaults(cli, datafiles, target, varname, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, silent=True, args=[
'show', '--deps', 'none', '--format', '%{vars}', target
@@ -63,7 +63,7 @@ def test_defaults(cli, datafiles, tmpdir, target, varname, expected):
('qmake.bst', 'make-install', "make -j1 INSTALL_ROOT=\"/custom/install/root\" install"),
])
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'overrides'))
-def test_overrides(cli, datafiles, tmpdir, target, varname, expected):
+def test_overrides(cli, datafiles, target, varname, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, silent=True, args=[
'show', '--deps', 'none', '--format', '%{vars}', target
@@ -74,7 +74,7 @@ def test_overrides(cli, datafiles, tmpdir, target, varname, expected):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'missing_variables'))
-def test_missing_variable(cli, datafiles, tmpdir):
+def test_missing_variable(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, silent=True, args=[
'show', '--deps', 'none', '--format', '%{config}', 'manual.bst'
@@ -97,7 +97,7 @@ def test_cyclic_variables(cli, datafiles):
@pytest.mark.parametrize('protected_var', PROTECTED_VARIABLES)
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'protected-vars'))
-def test_use_of_protected_var_project_conf(cli, tmpdir, datafiles, protected_var):
+def test_use_of_protected_var_project_conf(cli, datafiles, protected_var):
project = str(datafiles)
conf = {
'name': 'test',
@@ -125,7 +125,7 @@ def test_use_of_protected_var_project_conf(cli, tmpdir, datafiles, protected_var
@pytest.mark.parametrize('protected_var', PROTECTED_VARIABLES)
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'protected-vars'))
-def test_use_of_protected_var_element_overrides(cli, tmpdir, datafiles, protected_var):
+def test_use_of_protected_var_element_overrides(cli, datafiles, protected_var):
project = str(datafiles)
conf = {
'name': 'test',
@@ -157,7 +157,7 @@ def test_use_of_protected_var_element_overrides(cli, tmpdir, datafiles, protecte
@pytest.mark.parametrize('protected_var', PROTECTED_VARIABLES)
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'protected-vars'))
-def test_use_of_protected_var_in_element(cli, tmpdir, datafiles, protected_var):
+def test_use_of_protected_var_in_element(cli, datafiles, protected_var):
project = str(datafiles)
element = {
'kind': 'import',
diff --git a/tests/frontend/artifact.py b/tests/frontend/artifact.py
index 896d39a38..c8301c529 100644
--- a/tests/frontend/artifact.py
+++ b/tests/frontend/artifact.py
@@ -32,7 +32,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
-def test_artifact_log(cli, tmpdir, datafiles):
+def test_artifact_log(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Get the cache key of our test element
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index e252282d1..808f7e128 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -453,7 +453,7 @@ def test_fetch_build_checkout(cli, tmpdir, datafiles, strict, kind):
@pytest.mark.datafiles(DATA_DIR)
-def test_install_to_build(cli, tmpdir, datafiles):
+def test_install_to_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element = 'installed-to-build.bst'
diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py
index 3b7f78f3b..1f29fdae6 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -295,7 +295,7 @@ def test_help_commands(cli, cmd, word_idx, expected):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'project'))
-def test_argument_artifact(cli, tmpdir, datafiles):
+def test_argument_artifact(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Build an import element with no dependencies (as there will only be ONE cache key)
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index 9edfad94b..c6914fb3b 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -87,7 +87,7 @@ def test_fetch_default_targets(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(TOP_DIR, 'consistencyerror'))
-def test_fetch_consistency_error(cli, tmpdir, datafiles):
+def test_fetch_consistency_error(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# When the error occurs outside of the scheduler at load time,
@@ -97,7 +97,7 @@ def test_fetch_consistency_error(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(TOP_DIR, 'consistencyerror'))
-def test_fetch_consistency_bug(cli, tmpdir, datafiles):
+def test_fetch_consistency_bug(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# FIXME:
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index 58ac4eeba..b919a99b6 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -85,7 +85,7 @@ def test_custom_logging(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_failed_build_listing(cli, tmpdir, datafiles):
+def test_failed_build_listing(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_names = []
for i in range(3):
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index 75810ccbd..aea7f49bf 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -271,7 +271,8 @@ def test_mirror_fetch_upstream_absent(cli, tmpdir, datafiles, kind):
@pytest.mark.datafiles(DATA_DIR)
-def test_mirror_fetch_multi(cli, tmpdir, datafiles):
+@pytest.mark.usefixtures("datafiles")
+def test_mirror_fetch_multi(cli, tmpdir):
output_file = os.path.join(str(tmpdir), "output.txt")
project_dir = str(tmpdir)
element_dir = os.path.join(project_dir, 'elements')
@@ -294,7 +295,8 @@ def test_mirror_fetch_multi(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_mirror_fetch_default_cmdline(cli, tmpdir, datafiles):
+@pytest.mark.usefixtures("datafiles")
+def test_mirror_fetch_default_cmdline(cli, tmpdir):
output_file = os.path.join(str(tmpdir), "output.txt")
project_dir = str(tmpdir)
element_dir = os.path.join(project_dir, 'elements')
@@ -324,7 +326,8 @@ def test_mirror_fetch_default_cmdline(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_mirror_fetch_default_userconfig(cli, tmpdir, datafiles):
+@pytest.mark.usefixtures("datafiles")
+def test_mirror_fetch_default_userconfig(cli, tmpdir):
output_file = os.path.join(str(tmpdir), "output.txt")
project_dir = str(tmpdir)
element_dir = os.path.join(project_dir, 'elements')
@@ -363,7 +366,8 @@ def test_mirror_fetch_default_userconfig(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_mirror_fetch_default_cmdline_overrides_config(cli, tmpdir, datafiles):
+@pytest.mark.usefixtures("datafiles")
+def test_mirror_fetch_default_cmdline_overrides_config(cli, tmpdir):
output_file = os.path.join(str(tmpdir), "output.txt")
project_dir = str(tmpdir)
element_dir = os.path.join(project_dir, 'elements')
diff --git a/tests/frontend/order.py b/tests/frontend/order.py
index 422fce260..7982d993d 100644
--- a/tests/frontend/order.py
+++ b/tests/frontend/order.py
@@ -73,7 +73,7 @@ def create_element(project, name, dependencies):
}, ['base.bst', 'middleware.bst', 'a.bst', 'app.bst', 'timezones.bst', 'target.bst']),
])
@pytest.mark.parametrize("operation", [('show'), ('fetch'), ('build')])
-def test_order(cli, datafiles, tmpdir, operation, target, template, expected):
+def test_order(cli, datafiles, operation, target, template, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Configure to only allow one fetcher at a time, make it easy to
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 0c4813766..b24cb22f3 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -464,7 +464,7 @@ def test_build_remote_option(caplog, cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
-def test_pull_access_rights(caplog, cli, tmpdir, datafiles):
+def test_pull_access_rights(cli, tmpdir, datafiles):
project = str(datafiles)
checkout = os.path.join(str(tmpdir), 'checkout')
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index 528f114a7..ddc971dc3 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -174,7 +174,7 @@ def test_show_except(cli, datafiles, targets, exceptions, expected):
# Testing multiple targets #
###############################################################
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'project'))
-def test_parallel_order(cli, tmpdir, datafiles):
+def test_parallel_order(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
elements = ['multiple_targets/order/0.bst',
'multiple_targets/order/1.bst']
@@ -203,7 +203,7 @@ def test_parallel_order(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'project'))
-def test_target_is_dependency(cli, tmpdir, datafiles):
+def test_target_is_dependency(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
elements = ['multiple_targets/dependency/zebry.bst',
'multiple_targets/dependency/horsey.bst']
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index ba78bcdfa..1eadac8d9 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -385,7 +385,7 @@ def test_track_cross_junction(cli, tmpdir, datafiles, cross_junction, ref_storag
@pytest.mark.datafiles(os.path.join(TOP_DIR, 'consistencyerror'))
-def test_track_consistency_error(cli, tmpdir, datafiles):
+def test_track_consistency_error(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Track the element causing a consistency error
@@ -395,7 +395,7 @@ def test_track_consistency_error(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(TOP_DIR, 'consistencyerror'))
-def test_track_consistency_bug(cli, tmpdir, datafiles):
+def test_track_consistency_bug(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Track the element causing an unhandled exception
diff --git a/tests/frontend/track_cross_junction.py b/tests/frontend/track_cross_junction.py
index 7fc9f9bc9..e01ea81d9 100644
--- a/tests/frontend/track_cross_junction.py
+++ b/tests/frontend/track_cross_junction.py
@@ -73,7 +73,7 @@ def generate_cross_element(project, subproject_name, import_name):
@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS])
-def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind):
+def test_cross_junction_multiple_projects(cli, tmpdir, kind):
tmpdir = tmpdir.join(kind)
# Generate 3 projects: main, a, b
@@ -124,7 +124,7 @@ def test_cross_junction_multiple_projects(cli, tmpdir, datafiles, kind):
@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS])
-def test_track_exceptions(cli, tmpdir, datafiles, kind):
+def test_track_exceptions(cli, tmpdir, kind):
tmpdir = tmpdir.join(kind)
_, project = generate_project(tmpdir, 'main', {'ref-storage': 'project.refs'})
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 122455bff..722512d6d 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -805,7 +805,7 @@ def test_detect_modifications(cli, tmpdir, datafiles, modification, strict):
# Test loading a future version
{"format-version": BST_WORKSPACE_FORMAT_VERSION + 1}
])
-def test_list_unsupported_workspace(cli, tmpdir, datafiles, workspace_cfg):
+def test_list_unsupported_workspace(cli, datafiles, workspace_cfg):
project = os.path.join(datafiles.dirname, datafiles.basename)
os.makedirs(os.path.join(project, '.bst'))
workspace_config_path = os.path.join(project, '.bst', 'workspaces.yml')
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index 3ed0533cf..9c49ee9fd 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -20,7 +20,7 @@ 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_autotools_build(cli, tmpdir, datafiles):
+def test_autotools_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'autotools/amhello.bst'
@@ -43,7 +43,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_autotools_confroot_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'autotools/amhelloconfroot.bst'
@@ -64,7 +64,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles):
# Test running an executable built with autotools
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_autotools_run(cli, tmpdir, datafiles):
+def test_autotools_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'autotools/amhello.bst'
diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py
index 9c2c6f06b..cfc2015e4 100644
--- a/tests/integration/build-uid.py
+++ b/tests/integration/build-uid.py
@@ -18,7 +18,7 @@ DATA_DIR = os.path.join(
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubblewrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_build_uid_overridden(cli, tmpdir, datafiles):
+def test_build_uid_overridden(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-uid/build-uid.bst'
@@ -36,7 +36,7 @@ def test_build_uid_overridden(cli, tmpdir, datafiles):
@pytest.mark.skipif(not IS_LINUX or not HAVE_BWRAP, reason='Only available on linux with bubbelwrap')
@pytest.mark.datafiles(DATA_DIR)
-def test_build_uid_in_project(cli, tmpdir, datafiles):
+def test_build_uid_in_project(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-uid/build-uid-1023.bst'
@@ -54,7 +54,7 @@ def test_build_uid_in_project(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_build_uid_default(cli, tmpdir, datafiles):
+def test_build_uid_default(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-uid/build-uid-default.bst'
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py
index 2b5fbb0e1..108182b60 100644
--- a/tests/integration/cachedfail.py
+++ b/tests/integration/cachedfail.py
@@ -21,7 +21,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
+def test_build_checkout_cached_fail(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements', 'element.bst')
checkout = os.path.join(cli.directory, 'checkout')
@@ -64,7 +64,7 @@ def test_build_checkout_cached_fail(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_build_depend_on_cached_fail(cli, tmpdir, datafiles):
+def test_build_depend_on_cached_fail(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
dep_path = os.path.join(project, 'elements', 'dep.bst')
target_path = os.path.join(project, 'elements', 'target.bst')
@@ -166,7 +166,7 @@ def test_push_cached_fail(cli, tmpdir, datafiles, on_error):
@pytest.mark.skipif(not (IS_LINUX and HAVE_BWRAP), reason='Only available with bubblewrap on Linux')
@pytest.mark.datafiles(DATA_DIR)
-def test_host_tools_errors_are_not_cached(cli, tmpdir, datafiles):
+def test_host_tools_errors_are_not_cached(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements', 'element.bst')
diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py
index 51e215655..408f0deff 100644
--- a/tests/integration/cmake.py
+++ b/tests/integration/cmake.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cmake_build(cli, tmpdir, datafiles):
+def test_cmake_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'cmake/cmakehello.bst'
@@ -33,7 +33,7 @@ def test_cmake_build(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cmake_confroot_build(cli, tmpdir, datafiles):
+def test_cmake_confroot_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'cmake/cmakeconfroothello.bst'
@@ -49,7 +49,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cmake_run(cli, tmpdir, datafiles):
+def test_cmake_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'cmake/cmakehello.bst'
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index 386e08438..0d59e793b 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -76,7 +76,7 @@ def create_compose_element(name, path, config={}):
'/usr/share/doc/amhello/README'])
])
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_compose_include(cli, tmpdir, datafiles, include_domains,
+def test_compose_include(cli, datafiles, include_domains,
exclude_domains, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
diff --git a/tests/integration/import.py b/tests/integration/import.py
index deef66bc1..85cbf9cd1 100644
--- a/tests/integration/import.py
+++ b/tests/integration/import.py
@@ -42,7 +42,7 @@ def create_import_element(name, path, source, target, source_path):
'/output/subdir',
'/output/subdir/test.txt']),
])
-def test_import(cli, tmpdir, datafiles, source, target, path, expected):
+def test_import(cli, datafiles, source, target, path, expected):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
diff --git a/tests/integration/make.py b/tests/integration/make.py
index a76fe9a41..3839608f6 100644
--- a/tests/integration/make.py
+++ b/tests/integration/make.py
@@ -20,7 +20,7 @@ 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_make_build(cli, tmpdir, datafiles):
+def test_make_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'make/makehello.bst'
@@ -38,7 +38,7 @@ def test_make_build(cli, tmpdir, datafiles):
# Test running an executable built with make
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_make_run(cli, tmpdir, datafiles):
+def test_make_run(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'make/makehello.bst'
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index f4ad6f9db..507434eaa 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -33,7 +33,7 @@ def create_manual_element(name, path, config, variables, environment):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_manual_element(cli, tmpdir, datafiles):
+def test_manual_element(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -67,7 +67,7 @@ strip
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_manual_element_environment(cli, tmpdir, datafiles):
+def test_manual_element_environment(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -97,7 +97,7 @@ def test_manual_element_environment(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_manual_element_noparallel(cli, tmpdir, datafiles):
+def test_manual_element_noparallel(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -132,7 +132,7 @@ def test_manual_element_noparallel(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_manual_element_logging(cli, tmpdir, datafiles):
+def test_manual_element_logging(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'import/import.bst'
diff --git a/tests/integration/messages.py b/tests/integration/messages.py
index 7f4194e0f..b4ab3337c 100644
--- a/tests/integration/messages.py
+++ b/tests/integration/messages.py
@@ -39,7 +39,7 @@ 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, tmpdir, datafiles):
+def test_disable_message_lines(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'message.bst'
@@ -75,7 +75,7 @@ def test_disable_message_lines(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_disable_error_lines(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'message.bst'
diff --git a/tests/integration/pip_element.py b/tests/integration/pip_element.py
index 48ca13bf5..e4277d24b 100644
--- a/tests/integration/pip_element.py
+++ b/tests/integration/pip_element.py
@@ -20,7 +20,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_pip_build(cli, tmpdir, datafiles):
+def test_pip_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -57,9 +57,9 @@ def test_pip_build(cli, tmpdir, datafiles):
# Test running an executable built with pip
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_pip_run(cli, tmpdir, datafiles):
+def test_pip_run(cli, datafiles):
# Create and build our test element
- test_pip_build(cli, tmpdir, datafiles)
+ test_pip_build(cli, datafiles)
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'pip/hello.bst'
diff --git a/tests/integration/pip_source.py b/tests/integration/pip_source.py
index 993b3a182..7cda6d29b 100644
--- a/tests/integration/pip_source.py
+++ b/tests/integration/pip_source.py
@@ -19,7 +19,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
-def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo):
+def test_pip_source_import(cli, datafiles, setup_pypi_repo):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -74,7 +74,7 @@ def test_pip_source_import(cli, tmpdir, datafiles, setup_pypi_repo):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_pip_source_build(cli, tmpdir, datafiles, setup_pypi_repo):
+def test_pip_source_build(cli, datafiles, setup_pypi_repo):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'pip/hello.bst'
diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index 1d01ca383..b6c9a5535 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -178,7 +178,7 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles):
("1", False)
])
@pytest.mark.datafiles(DATA_DIR)
-def test_invalid_cache_pullbuildtrees(cli, datafiles, tmpdir, value, success):
+def test_invalid_cache_pullbuildtrees(cli, datafiles, value, success):
project = os.path.join(datafiles.dirname, datafiles.basename)
cli.configure({
diff --git a/tests/integration/sandbox-bwrap.py b/tests/integration/sandbox-bwrap.py
index 2c939e9be..f64de3cf4 100644
--- a/tests/integration/sandbox-bwrap.py
+++ b/tests/integration/sandbox-bwrap.py
@@ -23,7 +23,7 @@ DATA_DIR = os.path.join(
@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, tmpdir, datafiles):
+def test_sandbox_bwrap_cleanup_build(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# This element depends on a base image with non-empty `/tmp` folder.
element_name = 'sandbox-bwrap/test-cleanup.bst'
@@ -36,7 +36,7 @@ def test_sandbox_bwrap_cleanup_build(cli, tmpdir, datafiles):
@pytest.mark.skipif(not HAVE_BWRAP, reason='Only available with bubblewrap')
@pytest.mark.skipif(not HAVE_BWRAP_JSON_STATUS, reason='Only available with bubblewrap supporting --json-status-fd')
@pytest.mark.datafiles(DATA_DIR)
-def test_sandbox_bwrap_distinguish_setup_error(cli, tmpdir, datafiles):
+def test_sandbox_bwrap_distinguish_setup_error(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'sandbox-bwrap/non-executable-shell.bst'
@@ -47,7 +47,7 @@ def test_sandbox_bwrap_distinguish_setup_error(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_sandbox_bwrap_return_subprocess(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'sandbox-bwrap/command-exit-42.bst'
diff --git a/tests/integration/script.py b/tests/integration/script.py
index 0297a3f0a..db7da0ad5 100644
--- a/tests/integration/script.py
+++ b/tests/integration/script.py
@@ -31,7 +31,7 @@ def create_script_element(name, path, config={}, variables={}):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_script(cli, tmpdir, datafiles):
+def test_script(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -59,7 +59,7 @@ def test_script(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_script_root(cli, tmpdir, datafiles):
+def test_script_root(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -91,7 +91,7 @@ def test_script_root(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_script_no_root(cli, tmpdir, datafiles):
+def test_script_no_root(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'script/script-layout.bst'
@@ -114,7 +114,7 @@ def test_script_no_root(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_script_cwd(cli, tmpdir, datafiles):
+def test_script_cwd(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_path = os.path.join(project, 'elements')
@@ -145,7 +145,7 @@ def test_script_cwd(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_script_layout(cli, tmpdir, datafiles):
+def test_script_layout(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'script/script-layout.bst'
@@ -164,7 +164,7 @@ def test_script_layout(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_regression_cache_corruption(cli, tmpdir, datafiles):
+def test_regression_cache_corruption(cli, datafiles):
project = str(datafiles)
checkout_original = os.path.join(cli.directory, 'checkout-original')
checkout_after = os.path.join(cli.directory, 'checkout-after')
@@ -194,7 +194,7 @@ def test_regression_cache_corruption(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_regression_tmpdir(cli, tmpdir, datafiles):
+def test_regression_tmpdir(cli, datafiles):
project = str(datafiles)
element_name = 'script/tmpdir.bst'
@@ -204,7 +204,7 @@ def test_regression_tmpdir(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_regression_cache_corruption_2(cli, tmpdir, datafiles):
+def test_regression_cache_corruption_2(cli, datafiles):
project = str(datafiles)
checkout_original = os.path.join(cli.directory, 'checkout-original')
checkout_after = os.path.join(cli.directory, 'checkout-after')
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index c4fb4e961..7ab34b65f 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -49,7 +49,7 @@ def execute_shell(cli, project, command, *, config=None, mount=None, element='ba
# executable
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_shell(cli, tmpdir, datafiles):
+def test_shell(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = execute_shell(cli, project, ["echo", "Ponies!"])
@@ -60,7 +60,7 @@ def test_shell(cli, tmpdir, datafiles):
# Test running an executable directly
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_executable(cli, tmpdir, datafiles):
+def test_executable(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = execute_shell(cli, project, ["/bin/echo", "Horseys!"])
@@ -72,7 +72,7 @@ def test_executable(cli, tmpdir, datafiles):
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_env_assign(cli, tmpdir, datafiles, animal):
+def test_env_assign(cli, datafiles, animal):
project = os.path.join(datafiles.dirname, datafiles.basename)
expected = animal + '\n'
@@ -92,7 +92,7 @@ def test_env_assign(cli, tmpdir, datafiles, animal):
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal):
+def test_env_assign_expand_host_environ(cli, datafiles, animal):
project = os.path.join(datafiles.dirname, datafiles.basename)
expected = 'The animal is: {}\n'.format(animal)
@@ -115,7 +115,7 @@ def test_env_assign_expand_host_environ(cli, tmpdir, datafiles, animal):
@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_env_assign_isolated(cli, tmpdir, datafiles, animal):
+def test_env_assign_isolated(cli, datafiles, animal):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = execute_shell(cli, project, ['/bin/sh', '-c', 'echo ${ANIMAL}'], isolate=True, config={
'shell': {
@@ -133,7 +133,7 @@ def test_env_assign_isolated(cli, tmpdir, datafiles, animal):
# /bin/sh)
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_no_shell(cli, tmpdir, datafiles):
+def test_no_shell(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_path = os.path.join(project, 'elements')
element_name = 'shell/no-shell.bst'
@@ -166,7 +166,7 @@ def test_no_shell(cli, tmpdir, datafiles):
@pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_host_files(cli, tmpdir, datafiles, path):
+def test_host_files(cli, datafiles, path):
project = os.path.join(datafiles.dirname, datafiles.basename)
ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
result = execute_shell(cli, project, ['cat', path], config={
@@ -187,7 +187,7 @@ def test_host_files(cli, tmpdir, datafiles, path):
@pytest.mark.parametrize("path", [("/etc"), ("/usr/share/pony")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_host_files_expand_environ(cli, tmpdir, datafiles, path):
+def test_host_files_expand_environ(cli, datafiles, path):
project = os.path.join(datafiles.dirname, datafiles.basename)
hostpath = os.path.join(project, 'files', 'shell-mount')
fullpath = os.path.join(path, 'pony.txt')
@@ -213,7 +213,7 @@ def test_host_files_expand_environ(cli, tmpdir, datafiles, path):
@pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_isolated_no_mount(cli, tmpdir, datafiles, path):
+def test_isolated_no_mount(cli, datafiles, path):
project = os.path.join(datafiles.dirname, datafiles.basename)
ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
result = execute_shell(cli, project, ['cat', path], isolate=True, config={
@@ -236,7 +236,7 @@ def test_isolated_no_mount(cli, tmpdir, datafiles, path):
@pytest.mark.parametrize("optional", [("mandatory"), ("optional")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_host_files_missing(cli, tmpdir, datafiles, optional):
+def test_host_files_missing(cli, datafiles, optional):
project = os.path.join(datafiles.dirname, datafiles.basename)
ponyfile = os.path.join(project, 'files', 'shell-mount', 'horsy.txt')
@@ -272,7 +272,7 @@ def test_host_files_missing(cli, tmpdir, datafiles, optional):
@pytest.mark.parametrize("path", [("/etc/pony.conf"), ("/usr/share/pony/pony.txt")])
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_cli_mount(cli, tmpdir, datafiles, path):
+def test_cli_mount(cli, datafiles, path):
project = os.path.join(datafiles.dirname, datafiles.basename)
ponyfile = os.path.join(project, 'files', 'shell-mount', 'pony.txt')
@@ -285,7 +285,7 @@ def test_cli_mount(cli, tmpdir, datafiles, path):
@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, tmpdir, datafiles):
+def test_workspace_visible(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_name = 'workspace/workspace-mount-fail.bst'
@@ -349,7 +349,7 @@ def test_sysroot(cli, tmpdir, datafiles):
# Test system integration commands can access devices in /dev
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_integration_devices(cli, tmpdir, datafiles):
+def test_integration_devices(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'integration.bst'
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index 3fd761f05..13d21548e 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -19,7 +19,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_buildtree_staged(cli_integration, tmpdir, datafiles):
+def test_buildtree_staged(cli_integration, datafiles):
# We can only test the non interacitve case
# The non interactive case defaults to not using buildtrees
# for `bst shell --build`
@@ -37,7 +37,7 @@ def test_buildtree_staged(cli_integration, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_buildtree_staged_forced_true(cli_integration, tmpdir, datafiles):
+def test_buildtree_staged_forced_true(cli_integration, datafiles):
# Test that if we ask for a build tree it is there.
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-shell/buildtree.bst'
@@ -77,7 +77,7 @@ def test_buildtree_staged_warn_empty_cached(cli_integration, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_buildtree_staged_if_available(cli_integration, tmpdir, datafiles):
+def test_buildtree_staged_if_available(cli_integration, datafiles):
# Test that a build tree can be correctly detected.
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-shell/buildtree.bst'
@@ -94,7 +94,7 @@ def test_buildtree_staged_if_available(cli_integration, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_buildtree_staged_forced_false(cli_integration, tmpdir, datafiles):
+def test_buildtree_staged_forced_false(cli_integration, datafiles):
# Test that if we ask not to have a build tree it is not there
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-shell/buildtree.bst'
@@ -112,7 +112,7 @@ def test_buildtree_staged_forced_false(cli_integration, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_buildtree_from_failure(cli_integration, tmpdir, datafiles):
+def test_buildtree_from_failure(cli_integration, datafiles):
# Test that we can use a build tree after a failure
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'build-shell/buildtree-fail.bst'
diff --git a/tests/integration/sockets.py b/tests/integration/sockets.py
index fc2fb2b92..15a575863 100644
--- a/tests/integration/sockets.py
+++ b/tests/integration/sockets.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_builddir_socket_ignored(cli, tmpdir, datafiles):
+def test_builddir_socket_ignored(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'sockets/make-builddir-socket.bst'
@@ -27,7 +27,7 @@ def test_builddir_socket_ignored(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_install_root_socket_ignored(cli, tmpdir, datafiles):
+def test_install_root_socket_ignored(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
element_name = 'sockets/make-install-root-socket.bst'
diff --git a/tests/integration/stack.py b/tests/integration/stack.py
index d5208d7be..9b0f733b2 100644
--- a/tests/integration/stack.py
+++ b/tests/integration/stack.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_stack(cli, tmpdir, datafiles):
+def test_stack(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'stack/stack.bst'
diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py
index 5db09d3d0..8944c285d 100644
--- a/tests/integration/symlinks.py
+++ b/tests/integration/symlinks.py
@@ -20,7 +20,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_absolute_symlinks(cli, tmpdir, datafiles):
+def test_absolute_symlinks(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'symlinks/dangling-symlink.bst'
@@ -41,7 +41,7 @@ def test_absolute_symlinks(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_disallow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, datafiles):
+def test_disallow_overlaps_inside_symlink_with_dangling_target(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'symlinks/dangling-symlink-overlap.bst'
@@ -56,7 +56,7 @@ def test_disallow_overlaps_inside_symlink_with_dangling_target(cli, tmpdir, data
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
-def test_detect_symlink_overlaps_pointing_outside_sandbox(cli, tmpdir, datafiles):
+def test_detect_symlink_overlaps_pointing_outside_sandbox(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
element_name = 'symlinks/symlink-to-outside-sandbox-overlap.bst'
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index f1d8d6fcd..d0fea10a8 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -19,7 +19,7 @@ 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, tmpdir, datafiles):
+def test_workspace_mount(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_name = 'workspace/workspace-mount.bst'
@@ -36,7 +36,7 @@ def test_workspace_mount(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_workspace_commanddir(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_name = 'workspace/workspace-commanddir.bst'
@@ -54,7 +54,7 @@ def test_workspace_commanddir(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_workspace_updated_dependency(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_path = os.path.join(project, 'elements')
@@ -109,7 +109,7 @@ def test_workspace_updated_dependency(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_workspace_update_dependency_failed(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_path = os.path.join(project, 'elements')
@@ -185,7 +185,7 @@ def test_workspace_update_dependency_failed(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_updated_dependency_nested(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_path = os.path.join(project, 'elements')
@@ -239,7 +239,7 @@ def test_updated_dependency_nested(cli, tmpdir, datafiles):
@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, tmpdir, datafiles):
+def test_incremental_configure_commands_run_only_once(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
workspace = os.path.join(cli.directory, 'workspace')
element_path = os.path.join(project, 'elements')
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py
index 268bfb21f..5804e96f0 100644
--- a/tests/internals/storage_vdir_import.py
+++ b/tests/internals/storage_vdir_import.py
@@ -221,13 +221,13 @@ def _import_test(tmpdir, original, overlay, generator_function, verify_contents=
# but this leads to more tests being listed in the output than are
# comfortable.
@pytest.mark.parametrize("original", range(1, len(root_filesets) + 1))
-def test_fixed_cas_import(cli, tmpdir, original):
+def test_fixed_cas_import(tmpdir, original):
for overlay in range(1, len(root_filesets) + 1):
_import_test(str(tmpdir), original, overlay, generate_import_roots, verify_contents=True)
@pytest.mark.parametrize("original", range(1, NUM_RANDOM_TESTS + 1))
-def test_random_cas_import(cli, tmpdir, original):
+def test_random_cas_import(tmpdir, original):
for overlay in range(1, NUM_RANDOM_TESTS + 1):
_import_test(str(tmpdir), original, overlay, generate_random_root, verify_contents=False)
@@ -247,10 +247,10 @@ def _listing_test(tmpdir, root, generator_function):
@pytest.mark.parametrize("root", range(1, 11))
-def test_random_directory_listing(cli, tmpdir, root):
+def test_random_directory_listing(tmpdir, root):
_listing_test(str(tmpdir), root, generate_random_root)
@pytest.mark.parametrize("root", [1, 2, 3, 4, 5])
-def test_fixed_directory_listing(cli, tmpdir, root):
+def test_fixed_directory_listing(tmpdir, root):
_listing_test(str(tmpdir), root, generate_import_roots)
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
index ddf1c487f..a2b56d4a7 100644
--- a/tests/sandboxes/missing-command.py
+++ b/tests/sandboxes/missing-command.py
@@ -13,7 +13,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(DATA_DIR)
-def test_missing_command(cli, tmpdir, datafiles):
+def test_missing_command(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['build', 'no-runtime.bst'])
result.assert_task_error(ErrorDomain.SANDBOX, 'missing-command')
diff --git a/tests/sources/local.py b/tests/sources/local.py
index 0b0227d1c..c494e2671 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -12,7 +12,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_missing_path(cli, tmpdir, datafiles):
+def test_missing_path(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Removing the local file causes preflight to fail
@@ -26,7 +26,7 @@ def test_missing_path(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_non_regular_file_or_directory(cli, tmpdir, datafiles):
+def test_non_regular_file_or_directory(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
localfile = os.path.join(project, 'file.txt')
@@ -44,7 +44,7 @@ def test_non_regular_file_or_directory(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_invalid_absolute_path(cli, tmpdir, datafiles):
+def test_invalid_absolute_path(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
with open(os.path.join(project, "target.bst"), 'r') as f:
@@ -62,7 +62,7 @@ def test_invalid_absolute_path(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'invalid-relative-path'))
-def test_invalid_relative_path(cli, tmpdir, datafiles):
+def test_invalid_relative_path(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['show', 'target.bst'])
@@ -128,7 +128,7 @@ def test_stage_symlink(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'file-exists'))
-def test_stage_file_exists(cli, tmpdir, datafiles):
+def test_stage_file_exists(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Build, checkout
diff --git a/tests/sources/patch.py b/tests/sources/patch.py
index 825c56bcb..761656580 100644
--- a/tests/sources/patch.py
+++ b/tests/sources/patch.py
@@ -12,7 +12,7 @@ DATA_DIR = os.path.join(
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_missing_patch(cli, tmpdir, datafiles):
+def test_missing_patch(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Removing the local file causes preflight to fail
@@ -26,7 +26,7 @@ def test_missing_patch(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_non_regular_file_patch(cli, tmpdir, datafiles):
+def test_non_regular_file_patch(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
patch_path = os.path.join(project, 'irregular_file.patch')
@@ -42,7 +42,7 @@ def test_non_regular_file_patch(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_invalid_absolute_path(cli, tmpdir, datafiles):
+def test_invalid_absolute_path(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
with open(os.path.join(project, "target.bst"), 'r') as f:
@@ -60,7 +60,7 @@ def test_invalid_absolute_path(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'invalid-relative-path'))
-def test_invalid_relative_path(cli, tmpdir, datafiles):
+def test_invalid_relative_path(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
result = cli.run(project=project, args=['show', 'irregular.bst'])
@@ -85,7 +85,7 @@ def test_stage_and_patch(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_stage_file_nonexistent_dir(cli, tmpdir, datafiles):
+def test_stage_file_nonexistent_dir(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Fails at build time because it tries to patch into a non-existing directory
@@ -95,7 +95,7 @@ def test_stage_file_nonexistent_dir(cli, tmpdir, datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))
-def test_stage_file_empty_dir(cli, tmpdir, datafiles):
+def test_stage_file_empty_dir(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Fails at build time because it tries to patch with nothing else staged
diff --git a/tests/sources/pip.py b/tests/sources/pip.py
index 3114a824e..7ff547b14 100644
--- a/tests/sources/pip.py
+++ b/tests/sources/pip.py
@@ -12,24 +12,24 @@ DATA_DIR = os.path.join(
)
-def generate_project(project_dir, tmpdir):
+def generate_project(project_dir):
project_file = os.path.join(project_dir, "project.conf")
_yaml.dump({'name': 'foo'}, project_file)
# Test that without ref, consistency is set appropriately.
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'no-ref'))
-def test_no_ref(cli, tmpdir, datafiles):
+def test_no_ref(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
- generate_project(project, tmpdir)
+ generate_project(project)
assert cli.get_element_state(project, 'target.bst') == 'no reference'
# Test that pip is not allowed to be the first source
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'first-source-pip'))
-def test_first_source(cli, tmpdir, datafiles):
+def test_first_source(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
- generate_project(project, tmpdir)
+ generate_project(project)
result = cli.run(project=project, args=[
'show', 'target.bst'
])
@@ -39,9 +39,9 @@ def test_first_source(cli, tmpdir, datafiles):
# Test that error is raised when neither packges nor requirements files
# have been specified
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'no-packages'))
-def test_no_packages(cli, tmpdir, datafiles):
+def test_no_packages(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
- generate_project(project, tmpdir)
+ generate_project(project)
result = cli.run(project=project, args=[
'show', 'target.bst'
])
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index 68662ed58..efea86339 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -14,7 +14,7 @@ DATA_DIR = os.path.join(
##################################################################
# Test that plugins can access data from previous sources
@pytest.mark.datafiles(DATA_DIR)
-def test_custom_transform_source(cli, tmpdir, datafiles):
+def test_custom_transform_source(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Ensure we can track
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index e602b3838..11f288b9a 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -307,7 +307,7 @@ def test_read_only_dir(cli, tmpdir, datafiles):
finally:
# Make tmpdir deletable no matter what happens
- def make_dir_writable(fn, path, excinfo):
+ def make_dir_writable(_fn, path, _excinfo):
os.chmod(os.path.dirname(path), 0o777)
if os.path.isdir(path):
os.rmdir(path)
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py
index a12b510aa..c70e91413 100644
--- a/tests/testutils/artifactshare.py
+++ b/tests/testutils/artifactshare.py
@@ -168,7 +168,7 @@ class ArtifactShare():
shutil.rmtree(self.directory)
- def _mock_statvfs(self, path):
+ def _mock_statvfs(self, _path):
repo_size = 0
for root, _, files in os.walk(self.repodir):
for filename in files:
diff --git a/tests/testutils/setuptools.py b/tests/testutils/setuptools.py
index 5bf4d2532..39f4314f2 100644
--- a/tests/testutils/setuptools.py
+++ b/tests/testutils/setuptools.py
@@ -9,7 +9,7 @@ class MockDist():
self.datafiles = datafiles
self.module_name = module_name
- def get_resource_filename(self, *args, **kwargs):
+ def get_resource_filename(self, *_args, **_kwargs):
return os.path.join(self.datafiles.dirname,
self.datafiles.basename,
self.module_name)