diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-06-11 14:51:25 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-06-18 09:45:00 +0000 |
commit | d139abbc8cb322ab1249b4ae7b23f86e20d4eb93 (patch) | |
tree | 5195073968340b24a2fe11644912555e9271e984 /tests | |
parent | e55a89bffad51955c6c245eac5df98d025b586b9 (diff) | |
download | buildstream-d139abbc8cb322ab1249b4ae7b23f86e20d4eb93.tar.gz |
CliIntegration: match methods to base class
Update 'run' to match the base class. This ensures that it is a fully
substitutable sub-class.
Introduce 'run_project_config' to allow explicit usage of extended
functionality, which wouldn't necessarily be supported by a different
subclass.
By making the signatures deliberately match, we can use PyLint to ensure
the signatures don't accidentally differ.
Since we're already relying on `kwargs['project']` succeeding, enforce
that run_project_config() only takes keyword arguments.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/build-uid.py | 6 | ||||
-rw-r--r-- | tests/integration/shell.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py index 2ebf230a1..26f1bd2d4 100644 --- a/tests/integration/build-uid.py +++ b/tests/integration/build-uid.py @@ -30,7 +30,8 @@ def test_build_uid_overridden(cli, datafiles): } } - result = cli.run(project=project, project_config=project_config, args=['build', element_name]) + result = cli.run_project_config( + project=project, project_config=project_config, args=['build', element_name]) assert result.exit_code == 0 @@ -48,7 +49,8 @@ def test_build_uid_in_project(cli, datafiles): } } - result = cli.run(project=project, project_config=project_config, args=['build', element_name]) + result = cli.run_project_config( + project=project, project_config=project_config, args=['build', element_name]) assert result.exit_code == 0 diff --git a/tests/integration/shell.py b/tests/integration/shell.py index 868064d5b..d0c9f1f99 100644 --- a/tests/integration/shell.py +++ b/tests/integration/shell.py @@ -33,7 +33,8 @@ DATA_DIR = os.path.join( # def execute_shell(cli, project, command, *, config=None, mount=None, element='base.bst', isolate=False): # Ensure the element is built - result = cli.run(project=project, project_config=config, args=['build', element]) + result = cli.run_project_config( + project=project, project_config=config, args=['build', element]) assert result.exit_code == 0 args = ['shell'] @@ -44,7 +45,8 @@ def execute_shell(cli, project, command, *, config=None, mount=None, element='ba args += ['--mount', host_path, target_path] args += [element, '--', *command] - return cli.run(project=project, project_config=config, args=args) + return cli.run_project_config( + project=project, project_config=config, args=args) # Test running something through a shell, allowing it to find the |