diff options
Diffstat (limited to 'tests/integration/cachedfail.py')
-rw-r--r-- | tests/integration/cachedfail.py | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py index 366346e2b..142e8e15f 100644 --- a/tests/integration/cachedfail.py +++ b/tests/integration/cachedfail.py @@ -35,9 +35,7 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") @pytest.mark.datafiles(DATA_DIR) -@pytest.mark.skipif( - not HAVE_SANDBOX, reason="Only available with a functioning sandbox" -) +@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") def test_build_checkout_cached_fail(cli, datafiles): project = str(datafiles) element_path = os.path.join(project, "elements", "element.bst") @@ -59,10 +57,7 @@ def test_build_checkout_cached_fail(cli, datafiles): assert cli.get_element_state(project, "element.bst") == "failed" # Now check it out - result = cli.run( - project=project, - args=["artifact", "checkout", "element.bst", "--directory", checkout], - ) + result = cli.run(project=project, args=["artifact", "checkout", "element.bst", "--directory", checkout],) result.assert_success() # Check that the checkout contains the file created before failure @@ -71,9 +66,7 @@ def test_build_checkout_cached_fail(cli, datafiles): @pytest.mark.datafiles(DATA_DIR) -@pytest.mark.skipif( - not HAVE_SANDBOX, reason="Only available with a functioning sandbox" -) +@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") def test_build_depend_on_cached_fail(cli, datafiles): project = str(datafiles) dep_path = os.path.join(project, "elements", "dep.bst") @@ -87,10 +80,7 @@ def test_build_depend_on_cached_fail(cli, datafiles): _yaml.roundtrip_dump(dep, dep_path) target = { "kind": "script", - "depends": [ - {"filename": "base.bst", "type": "build",}, - {"filename": "dep.bst", "type": "build",}, - ], + "depends": [{"filename": "base.bst", "type": "build",}, {"filename": "dep.bst", "type": "build",},], "config": {"commands": ["test -e /foo",],}, } _yaml.roundtrip_dump(target, target_path) @@ -110,9 +100,7 @@ def test_build_depend_on_cached_fail(cli, datafiles): assert cli.get_element_state(project, "target.bst") == "waiting" -@pytest.mark.skipif( - not HAVE_SANDBOX, reason="Only available with a functioning sandbox" -) +@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("on_error", ("continue", "quit")) def test_push_cached_fail(cli, tmpdir, datafiles, on_error): @@ -142,10 +130,7 @@ def test_push_cached_fail(cli, tmpdir, datafiles, on_error): ) # Build the element, continuing to finish active jobs on error. - result = cli.run( - project=project, - args=["--on-error={}".format(on_error), "build", "element.bst"], - ) + result = cli.run(project=project, args=["--on-error={}".format(on_error), "build", "element.bst"],) result.assert_main_error(ErrorDomain.STREAM, None) # This element should have failed @@ -154,9 +139,7 @@ def test_push_cached_fail(cli, tmpdir, datafiles, on_error): assert share.get_artifact(cli.get_artifact_name(project, "test", "element.bst")) -@pytest.mark.skipif( - not HAVE_SANDBOX, reason="Only available with a functioning sandbox" -) +@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("on_error", ("continue", "quit")) def test_push_failed_missing_shell(cli, tmpdir, datafiles, on_error): @@ -190,10 +173,7 @@ def test_push_failed_missing_shell(cli, tmpdir, datafiles, on_error): ) # Build the element, continuing to finish active jobs on error. - result = cli.run( - project=project, - args=["--on-error={}".format(on_error), "build", "element.bst"], - ) + result = cli.run(project=project, args=["--on-error={}".format(on_error), "build", "element.bst"],) result.assert_main_error(ErrorDomain.STREAM, None) # This element should have failed @@ -202,9 +182,7 @@ def test_push_failed_missing_shell(cli, tmpdir, datafiles, on_error): assert share.get_artifact(cli.get_artifact_name(project, "test", "element.bst")) -@pytest.mark.skipif( - HAVE_SANDBOX != "bwrap", reason="Only available with bubblewrap on Linux" -) +@pytest.mark.skipif(HAVE_SANDBOX != "bwrap", reason="Only available with bubblewrap on Linux") @pytest.mark.datafiles(DATA_DIR) def test_host_tools_errors_are_not_cached(cli, datafiles, tmp_path): # Create symlink to buildbox-casd to work with custom PATH |