summaryrefslogtreecommitdiff
path: root/tests/cachekey/cachekey.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cachekey/cachekey.py')
-rw-r--r--tests/cachekey/cachekey.py33
1 files changed, 7 insertions, 26 deletions
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 882d07240..eb248b9ed 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -153,9 +153,7 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project",)
# The cache key test uses a project which exercises all plugins,
# so we cant run it at all if we dont have them installed.
#
-@pytest.mark.skipif(
- MACHINE_ARCH != "x86-64", reason="Cache keys depend on architecture"
-)
+@pytest.mark.skipif(MACHINE_ARCH != "x86-64", reason="Cache keys depend on architecture")
@pytest.mark.skipif(not IS_LINUX, reason="Only available on linux")
@pytest.mark.skipif(HAVE_BZR is False, reason="bzr is not available")
@pytest.mark.skipif(HAVE_GIT is False, reason="git is not available")
@@ -174,11 +172,7 @@ def test_cache_key(datafiles, cli):
# https://github.com/omarkohl/pytest-datafiles/issues/11
os.chmod(goodbye_link, 0o755)
- result = cli.run(
- project=project,
- silent=True,
- args=["show", "--format", "%{name}::%{full-key}", "target.bst"],
- )
+ result = cli.run(project=project, silent=True, args=["show", "--format", "%{name}::%{full-key}", "target.bst"],)
result.assert_success()
assert_cache_keys(project, result.output)
@@ -198,9 +192,7 @@ def test_cache_key(datafiles, cli):
],
],
)
-def test_cache_key_fatal_warnings(
- cli, tmpdir, first_warnings, second_warnings, identical_keys
-):
+def test_cache_key_fatal_warnings(cli, tmpdir, first_warnings, second_warnings, identical_keys):
# Builds project, Runs bst show, gathers cache keys
def run_get_cache_key(project_name, warnings):
@@ -218,10 +210,7 @@ def test_cache_key_fatal_warnings(
element_file = str(elem_dir.join("stack.bst"))
_yaml.roundtrip_dump({"kind": "stack"}, file=element_file)
- result = cli.run(
- project=str(project_dir),
- args=["show", "--format", "%{name}::%{full-key}", "stack.bst"],
- )
+ result = cli.run(project=str(project_dir), args=["show", "--format", "%{name}::%{full-key}", "stack.bst"],)
return result.output
# Returns true if all keys are identical
@@ -241,23 +230,15 @@ def test_keys_stable_over_targets(cli, datafiles):
target2 = "elements/key-stability/t2.bst"
project = str(datafiles)
- full_graph_result = cli.run(
- project=project, args=["show", "--format", "%{name}::%{full-key}", root_element]
- )
+ full_graph_result = cli.run(project=project, args=["show", "--format", "%{name}::%{full-key}", root_element])
full_graph_result.assert_success()
all_cache_keys = parse_output_keys(full_graph_result.output)
- ordering1_result = cli.run(
- project=project,
- args=["show", "--format", "%{name}::%{full-key}", target1, target2],
- )
+ ordering1_result = cli.run(project=project, args=["show", "--format", "%{name}::%{full-key}", target1, target2],)
ordering1_result.assert_success()
ordering1_cache_keys = parse_output_keys(ordering1_result.output)
- ordering2_result = cli.run(
- project=project,
- args=["show", "--format", "%{name}::%{full-key}", target2, target1],
- )
+ ordering2_result = cli.run(project=project, args=["show", "--format", "%{name}::%{full-key}", target2, target1],)
ordering2_result.assert_success()
ordering2_cache_keys = parse_output_keys(ordering2_result.output)