diff options
Diffstat (limited to 'tests/frontend/artifact_delete.py')
-rw-r--r-- | tests/frontend/artifact_delete.py | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/tests/frontend/artifact_delete.py b/tests/frontend/artifact_delete.py index 9389788b3..a93d99ef6 100644 --- a/tests/frontend/artifact_delete.py +++ b/tests/frontend/artifact_delete.py @@ -74,9 +74,7 @@ def test_artifact_delete_artifact(cli, tmpdir, datafiles): result.assert_success() # Check that the ARTIFACT is no longer in the cache - assert not os.path.exists( - os.path.join(local_cache, "cas", "refs", "heads", artifact) - ) + assert not os.path.exists(os.path.join(local_cache, "cas", "refs", "heads", artifact)) # Test the `bst artifact delete` command with multiple, different arguments. @@ -190,9 +188,7 @@ def test_artifact_delete_elements_build_deps(cli, tmpdir, datafiles): for state in bdep_states.values(): assert state == "cached" - result = cli.run( - project=project, args=["artifact", "delete", "--deps", "build", element] - ) + result = cli.run(project=project, args=["artifact", "delete", "--deps", "build", element]) result.assert_success() # Assert that the build deps have been deleted and that the artifact remains cached @@ -227,20 +223,14 @@ def test_artifact_delete_artifacts_build_deps(cli, tmpdir, datafiles): bdep_refs = [] bdep_states = cli.get_element_states(project, [element], deps="build") for bdep in bdep_states.keys(): - bdep_refs.append( - os.path.join( - "test", _get_normal_name(bdep), cli.get_element_key(project, bdep) - ) - ) + bdep_refs.append(os.path.join("test", _get_normal_name(bdep), cli.get_element_key(project, bdep))) # Assert build dependencies are cached for ref in bdep_refs: assert os.path.exists(os.path.join(local_cache, "artifacts", "refs", ref)) # Delete the artifact - result = cli.run( - project=project, args=["artifact", "delete", "--deps", "build", artifact] - ) + result = cli.run(project=project, args=["artifact", "delete", "--deps", "build", artifact]) result.assert_success() # Check that the artifact's build deps are no longer in the cache @@ -265,9 +255,7 @@ def test_artifact_delete_artifact_with_deps_all_fails(cli, tmpdir, datafiles): artifact = os.path.join("test", os.path.splitext(element)[0], cache_key) # Try to delete the artifact with all of its dependencies - result = cli.run( - project=project, args=["artifact", "delete", "--deps", "all", artifact] - ) + result = cli.run(project=project, args=["artifact", "delete", "--deps", "all", artifact]) result.assert_main_error(ErrorDomain.STREAM, None) assert "Error: '--deps all' is not supported for artifact refs" in result.stderr |