Advertisement
Guest User

Untitled

a guest
Jul 1st, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. =============================================== FAILURES ================================================
  2. _____________________________ test_set_directory_and_directory_as_argument ______________________________
  3.  
  4. cli = <buildstream.testing.runcli.Cli object at 0x7fe94d34fcc0>
  5. tmpdir = local('/home/alexandrufazakas/Documents/buildstream/.tox/py35/tmp/test_set_directory_and_directo0')
  6.  
  7. def test_set_directory_and_directory_as_argument(cli, tmpdir):
  8. result = cli.run(args=['-C', '/foo/bar', 'init', '--project-name', 'foo', '/boo/far'])
  9. > result.assert_main_error(ErrorDomain.APP, 'init-with-set-directory')
  10.  
  11. tests/frontend/init.py:95:
  12. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  13.  
  14. self = <buildstream.testing.runcli.Result object at 0x7fe94d344d68>, error_domain = <ErrorDomain.APP: 12>
  15. error_reason = 'init-with-set-directory', fail_message = ''
  16.  
  17. def assert_main_error(self,
  18. error_domain,
  19. error_reason,
  20. fail_message='',
  21. *, debug=False):
  22. if debug:
  23. print(
  24. """
  25. Exit code: {}
  26. Exception: {}
  27. Domain: {}
  28. Reason: {}
  29. """.format(
  30. self.exit_code,
  31. self.exception,
  32. self.exception.domain,
  33. self.exception.reason
  34. ))
  35. assert self.exit_code == -1, fail_message
  36. assert self.exc is not None, fail_message
  37. assert self.exception is not None, fail_message
  38. assert isinstance(self.exception, BstError), fail_message
  39. > assert self.unhandled_exception is False
  40. E AssertionError
  41.  
  42. src/buildstream/testing/runcli.py:156: AssertionError
  43. ----------------------------------------- Captured stdout call ------------------------------------------
  44. BuildStream exited with code -1 for invocation:
  45. 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
  46. ----------------------------------------- Captured stderr call ------------------------------------------
  47. Traceback (most recent call last):
  48. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/testing/runcli.py", line 394, in _invoke
  49. cli_object.main(args=args or (), prog_name=cli_object.name)
  50. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 195, in override_main
  51. standalone_mode=standalone_mode, **extra)
  52. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 717, in main
  53. rv = self.invoke(ctx)
  54. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
  55. return _process_result(sub_ctx.command.invoke(sub_ctx))
  56. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 956, in invoke
  57. return ctx.invoke(self.callback, **ctx.params)
  58. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/core.py", line 555, in invoke
  59. return callback(*args, **kwargs)
  60. File "/home/alexandrufazakas/Documents/buildstream/.tox/py35/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
  61. return f(get_current_context().obj, *args, **kwargs)
  62. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/cli.py", line 326, in init
  63. app.init_project(project_name, format_version, element_path, force, target_directory)
  64. File "/home/alexandrufazakas/Documents/buildstream/src/buildstream/_frontend/app.py", line 332, in init_project
  65. detail="Please use 'bst init {}' instead.".format(directory))
  66. buildstream._exceptions.AppError: Attempted to use -C or --directory with init.
  67. WARNING: Coverage disabled via --no-cov switch!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement