Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =============================================== FAILURES ================================================
- _____________________________ test_set_directory_and_directory_as_argument ______________________________
- cli = <buildstream.testing.runcli.Cli object at 0x7fe94d34fcc0>
- tmpdir = local('/home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_set_directory_and_directo0')
- def test_set_directory_and_directory_as_argument(cli, tmpdir):
- result = cli.run(args=['-C', '/foo/bar', 'init', '--project-name', 'foo', '/boo/far'])
- > result.assert_main_error(ErrorDomain.APP, 'init-with-set-directory')
- tests/frontend/init.py:95:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <buildstream.testing.runcli.Result object at 0x7fe94d344d68>, error_domain = <ErrorDomain.APP: 12>
- error_reason = 'init-with-set-directory', fail_message = ''
- def assert_main_error(self,
- error_domain,
- error_reason,
- fail_message='',
- *, debug=False):
- if debug:
- print(
- """
- Exit code: {}
- Exception: {}
- Domain: {}
- Reason: {}
- """.format(
- self.exit_code,
- self.exception,
- self.exception.domain,
- self.exception.reason
- ))
- assert self.exit_code == -1, fail_message
- assert self.exc is not None, fail_message
- assert self.exception is not None, fail_message
- assert isinstance(self.exception, BstError), fail_message
- > assert self.unhandled_exception is False
- E AssertionError
- src/buildstream/testing/runcli.py:156: AssertionError
- ----------------------------------------- Captured stdout call ------------------------------------------
- BuildStream exited with code -1 for invocation:
- bst --no-colors --config /home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_set_directory_and_directo0/cache/buildstream.conf -C /foo/bar init --project-name foo /boo/far
- ----------------------------------------- Captured stderr call ------------------------------------------
- Traceback (most recent call last):
- File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/testing/runcli.py", line 394, in _invoke
- cli_object.main(args=args or (), prog_name=cli_object.name)
- File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 195, in override_main
- standalone_mode=standalone_mode, **extra)
- File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 717, in main
- rv = self.invoke(ctx)
- File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
- return _process_result(sub_ctx.command.invoke(sub_ctx))
- File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 956, in invoke
- return ctx.invoke(self.callback, **ctx.params)
- File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 555, in invoke
- return callback(*args, **kwargs)
- File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
- return f(get_current_context().obj, *args, **kwargs)
- File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 326, in init
- app.init_project(project_name, format_version, element_path, force, target_directory)
- File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/app.py", line 332, in init_project
- detail="Please use 'bst init {}' instead.".format(directory))
- buildstream._exceptions.AppError: Attempted to use -C or --directory with init.
- WARNING: Coverage disabled via --no-cov switch!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement