diff options
Diffstat (limited to 'tests/frontend/init.py')
-rw-r--r-- | tests/frontend/init.py | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/tests/frontend/init.py b/tests/frontend/init.py index 01686b7c6..aef9d148e 100644 --- a/tests/frontend/init.py +++ b/tests/frontend/init.py @@ -29,16 +29,7 @@ def test_all_options(cli, tmpdir): project_path = os.path.join(project, "project.conf") result = cli.run( - args=[ - "init", - "--project-name", - "foo", - "--format-version", - "2", - "--element-path", - "ponies", - project, - ] + args=["init", "--project-name", "foo", "--format-version", "2", "--element-path", "ponies", project,] ) result.assert_success() @@ -96,9 +87,7 @@ def test_relative_path_directory_as_argument(cli, tmpdir): def test_set_directory_and_directory_as_argument(cli, tmpdir): - result = cli.run( - args=["-C", "/foo/bar", "init", "--project-name", "foo", "/boo/far"] - ) + result = cli.run(args=["-C", "/foo/bar", "init", "--project-name", "foo", "/boo/far"]) result.assert_main_error(ErrorDomain.APP, "init-with-set-directory") @@ -110,33 +99,13 @@ def test_bad_project_name(cli, tmpdir, project_name): @pytest.mark.parametrize("format_version", [(str(-1)), (str(BST_FORMAT_VERSION + 1))]) def test_bad_format_version(cli, tmpdir, format_version): - result = cli.run( - args=[ - "init", - "--project-name", - "foo", - "--format-version", - format_version, - str(tmpdir), - ] - ) + result = cli.run(args=["init", "--project-name", "foo", "--format-version", format_version, str(tmpdir),]) result.assert_main_error(ErrorDomain.APP, "invalid-format-version") -@pytest.mark.parametrize( - "element_path", [("/absolute/path"), ("../outside/of/project")] -) +@pytest.mark.parametrize("element_path", [("/absolute/path"), ("../outside/of/project")]) def test_bad_element_path(cli, tmpdir, element_path): - result = cli.run( - args=[ - "init", - "--project-name", - "foo", - "--element-path", - element_path, - str(tmpdir), - ] - ) + result = cli.run(args=["init", "--project-name", "foo", "--element-path", element_path, str(tmpdir),]) result.assert_main_error(ErrorDomain.APP, "invalid-element-path") @@ -154,9 +123,7 @@ def test_element_path_interactive(cli, tmp_path, monkeypatch, element_path): def create(cls, *args, **kwargs): return DummyInteractiveApp(*args, **kwargs) - def _init_project_interactive( - self, *args, **kwargs - ): # pylint: disable=arguments-differ + def _init_project_interactive(self, *args, **kwargs): # pylint: disable=arguments-differ return ("project_name", "0", element_path) monkeypatch.setattr(App, "create", DummyInteractiveApp.create) |