3

I'm trying to use Pybuilder to build and then run my python project unittests. Everything goes well in the build process, but when it goes to run my unittests I receive the following error message:

 File "/Users/username/Desktop/Work/pythonutilities/tests/test_elastic_controller.py", line 5, in <module>
    from src.elastic_controller import ElasticController
ModuleNotFoundError: No module named 'src'
It can't seem to import the src module.

However, if I then create a task that executes a separate setup.py install (via command line using the subprocess library), it works perfectly. Pybuilder should be creating and installing it's own setup.py though, correct? So this shouldn't be a problem or a suitable solution.

I'm not sure where to go next, any help would be appreciated.

CrizR
  • 688
  • 1
  • 6
  • 26
  • This is still an issue I'm encountering. I should add that it works as long as there exists a folder with my project data in python's package-data directory. – CrizR Feb 27 '18 at 16:23

0 Answers0