I am using pyramids framework for large project and I find it messy to have all my tests in one tests.py file. So I have decided to create directory that would contain files with my tests. Problem is, I have no idea, how to tell pyramids, to run my tests from this directory.
I am running the tests using python setup.py test -q.
But this of course do not work, after I have moved my tests into tests directory. What to do, to make it work?
I have finally found the way to do it. I have just created directory named tests, put my tests inside it and created empty file __init__.py. I needed to fix relative imports, or it make strange errors like:
AttributeError: 'module' object has no attribute 'tests'
I do not really understand what is going on, and what is the nosetest role here, but it works.
If someone is able to explain this problematics deeper, it would be nice.
Having tests in multiple files