amol- / depot

Toolkit for storing files and attachments in web applications
MIT License
161 stars 41 forks source link

tox.ini for locally run automated tests with multiple python versions #40

Closed vlcinsky closed 7 years ago

vlcinsky commented 7 years ago

Currently the package has definition of integration tests by means of .travis.yml. This allows for automated testing after changes are committed, however, a developer cannot run such tests locally without travis service.

Proposed solution (keep it simple)

Possible extensions of proposed solution

If such idea sounds acceptable, I could provide PR with initial Proposed solution, which would conclude this issue.

Extended solution may follow, but it could include more work and extend the basic functionality too far blocking possible simplification of locally run tests for developer.

amol- commented 7 years ago

I'm fine with introducing tox, it's something that has been on my mind for quite some time, but couldn't find the time to do so.

I think btw that everything should go through tox, travis too. It doesn't make much sense to keep around two different testing configurations and tox can easily be driven by a travis through TOXENV.

If you want to submit a patch in that direction I'll gladly accept it.

vlcinsky commented 7 years ago

Great. I will put it into my task list. I agree, that .trafis.yml shall reuse what tox.ini will define.

My plan is to kick off the use of tox.ini and go as far as is easy for me, handing the rest (like more complex test cases involving other systems around) to you or to later time.

vlcinsky commented 7 years ago

Creating tox.ini and related test_requirements.txt file I see review of supported python versions is needed. Here is my checklist stating proposed python version support:

What shall be done:

vlcinsky commented 7 years ago

Shall we allow [testing] extras in setup.py?

Currently setup.py allows for installing with [testing] extras to run package based self-test.

I feel that such testing is obsolete now for couple of reasons and propose:

vlcinsky commented 7 years ago

Skipping locally run tests dependent on mongodb availability

$ tox

runs all tests happily if mongodb is running. However, with mongodb missing it fails.

I think, it would be better to skip such tests as is done for boto and AWS S3 credentials. As I am not so much experienced with nosetests fixtures, I would appreciate help with skipping tests in tests/test_storage_interface.py.

amol- commented 7 years ago

Merged in tox pull request and added skipping of mongodb tests when mongodb is not running.