Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World example can't find mockito during unit tests #685

Closed
arcivanov opened this issue Apr 8, 2020 · 0 comments · Fixed by #688
Closed

Hello World example can't find mockito during unit tests #685

arcivanov opened this issue Apr 8, 2020 · 0 comments · Fixed by #688
Assignees
Labels
Milestone

Comments

@arcivanov
Copy link
Member

[ERROR] Test has error: unittest.loader._FailedTest.helloworld_tests
Traceback (most recent call last):
  File "/home/arcivanov/.pyenv/versions/3.8.2/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/home/arcivanov/.pyenv/versions/3.8.2/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/home/arcivanov/.pyenv/versions/3.8.2/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/home/arcivanov/.pyenv/versions/3.8.2/lib/python3.8/unittest/loader.py", line 34, in testFailure
    raise self._exception
ImportError: Failed to import test module: helloworld_tests
Traceback (most recent call last):
  File "/home/arcivanov/.pyenv/versions/3.8.2/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/arcivanov/Documents/src/arcivanov/helloworld/src/unittest/python/helloworld_tests.py", line 1, in <module>
    from mockito import mock, verify
ModuleNotFoundError: No module named 'mockito'


Traceback (most recent call last):
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/cli.py", line 467, in main
    summary = reactor.build(
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/reactor.py", line 270, in build_execution_plan
    task_execution_summaries = self.execution_manager.execute_execution_plan(
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/execution.py", line 399, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/execution.py", line 346, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/execution.py", line 187, in execute
    executable.execute(argument_dict)
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/execution.py", line 101, in execute
    self.callable(*arguments)
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 67, in run_unit_tests
    run_tests(project, logger, reactor, "unittest", "unit tests")
  File "/home/arcivanov/.pyenv/versions/3.8.2/envs/pyb-3.8.2/lib/python3.8/site-packages/pybuilder/plugins/python/unittest_plugin.py", line 107, in run_tests
    raise BuildFailedException(msg)
pybuilder.errors.BuildFailedException: There were 1 error(s) and 0 failure(s) in unit tests
------------------------------------------------------------
BUILD FAILED - There were 1 error(s) and 0 failure(s) in unit tests (pybuilder/plugins/python/unittest_plugin.py:107)
------------------------------------------------------------
Build finished at 2020-04-08 16:09:45
Build took 10 seconds (10966 ms)
@arcivanov arcivanov added the bug label Apr 8, 2020
@arcivanov arcivanov added this to the v0.12.0 milestone Apr 8, 2020
@arcivanov arcivanov self-assigned this Apr 8, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 9, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 9, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 9, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 10, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 10, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 12, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 12, 2020
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant