I am trying to integrate TravisCI into my workflow and realized that I have some dependencies due to my old directory structure (not having standalone, virtualenv-able git repos).
When I try to run nosetestslocally, it just runs the tests; when TravisCI tries to launch them, it fails with an error import. In particular, I have one of the lines in my test script:
from myproject import something
My directory structure inside my git repo myprojectlooks something like this:
.travis.yml
requirements.txt
something.py
tests/
test_something.py
- I tried to get this locally (because then I would understand the TravisCI problem, maybe), but I can't do it.
- I tried working with regular python and used virtualenv, which added
noseto it requirements.txt, and the tests always passed locally.
I feel that I still have not understood the absolute import-relative import, and I can’t say whether it will play here, or if I just do something obvious and dumb in my project.
Desired result: find out why TravisCI fails, and fix my repo accordingly so that I can accomplish and build things correctly, both locally and in TravisCI. If this requires more radical changes, such as “you must have setup.pyone that makes blah-blah in the environment” or similar, please let me know. I am new to this aspect of Python and find the current documentation inconsistent.
FYI, , --exe .