Running the unit tests normally works and passes all the tests, but when trying to build using pybuilder it gives me a Build Error:
BUILD FAILED - There were 1 error(s) and 0 failure(s) in unit tests (site-packages/pybuilder/plugins/python/unittest_plugin.py:114)
This was caused by the unit test not finding the module it was meant to test.
File layout:
.
├── main
│ ├── python
│ │ ├── __pycache__
│ │ │ └── utils.cpython-36.pyc
│ │ └── utils.py
│ └── scripts
│ ├── project.py
│ └── __pycache__
│ └── project.cpython-36.pyc
└── unittest
└── python
├── project_tests.py
├── __pycache__
│ ├── project_tests.cpython-36.pyc
│ └── utils_tests.cpython-36.pyc
└── utils_tests.py
Currently I am importing the module project by:
import sys
sys.path.insert(0, '../../main/scripts')
import project
First post and also not a pro Python programmer so I apologize if I missed something to post and/or it is an obvious solution. I am on Ubuntu 18.04.
Thank you.