diff options
Diffstat (limited to 'tests/frontend/overlaps.py')
-rw-r--r-- | tests/frontend/overlaps.py | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py index 4f6f72af5..d3e0c9d60 100644 --- a/tests/frontend/overlaps.py +++ b/tests/frontend/overlaps.py @@ -13,9 +13,7 @@ from tests.testutils import generate_junction DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "overlaps") -def gen_project( - project_dir, fail_on_overlap, use_fatal_warnings=True, project_name="test" -): +def gen_project(project_dir, fail_on_overlap, use_fatal_warnings=True, project_name="test"): template = {"name": project_name} if use_fatal_warnings: template["fatal-warnings"] = [CoreWarnings.OVERLAPS] if fail_on_overlap else [] @@ -48,9 +46,7 @@ def test_overlaps_error(cli, datafiles, use_fatal_warnings): def test_overlaps_whitelist(cli, datafiles): project_dir = str(datafiles) gen_project(project_dir, True) - result = cli.run( - project=project_dir, silent=True, args=["build", "collect-whitelisted.bst"] - ) + result = cli.run(project=project_dir, silent=True, args=["build", "collect-whitelisted.bst"]) result.assert_success() @@ -58,9 +54,7 @@ def test_overlaps_whitelist(cli, datafiles): def test_overlaps_whitelist_ignored(cli, datafiles): project_dir = str(datafiles) gen_project(project_dir, False) - result = cli.run( - project=project_dir, silent=True, args=["build", "collect-whitelisted.bst"] - ) + result = cli.run(project=project_dir, silent=True, args=["build", "collect-whitelisted.bst"]) result.assert_success() @@ -71,11 +65,7 @@ def test_overlaps_whitelist_on_overlapper(cli, datafiles): # it'll still fail because A doesn't permit overlaps. project_dir = str(datafiles) gen_project(project_dir, True) - result = cli.run( - project=project_dir, - silent=True, - args=["build", "collect-partially-whitelisted.bst"], - ) + result = cli.run(project=project_dir, silent=True, args=["build", "collect-partially-whitelisted.bst"],) result.assert_main_error(ErrorDomain.STREAM, None) result.assert_task_error(ErrorDomain.PLUGIN, CoreWarnings.OVERLAPS) @@ -100,9 +90,7 @@ def test_overlap_subproject(cli, tmpdir, datafiles, project_policy, subproject_p junction_path = os.path.join(project_dir, "sub-project.bst") gen_project(project_dir, bool(project_policy == "fail"), project_name="test") - gen_project( - subproject_dir, bool(subproject_policy == "fail"), project_name="subtest" - ) + gen_project(subproject_dir, bool(subproject_policy == "fail"), project_name="subtest") generate_junction(tmpdir, subproject_dir, junction_path) # Here we have a dependency chain where the project element @@ -111,9 +99,7 @@ def test_overlap_subproject(cli, tmpdir, datafiles, project_policy, subproject_p # Test that overlap error vs warning policy for this overlap # is always controlled by the project and not the subproject. # - result = cli.run( - project=project_dir, silent=True, args=["build", "sub-collect.bst"] - ) + result = cli.run(project=project_dir, silent=True, args=["build", "sub-collect.bst"]) if project_policy == "fail": result.assert_main_error(ErrorDomain.STREAM, None) result.assert_task_error(ErrorDomain.PLUGIN, CoreWarnings.OVERLAPS) |