Closed vlcinsky closed 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.
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.
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:
.travis.yml
does not test this version, but setup.py
contains dependency checks for this version.travis.yml
tests this version.travis.yml
tests this version.travis.yml
tests this version.travis.yml
does not test this version (yet)What shall be done:
setup.py
declare supported explicit versions using trove classifierssetup.py
remove code used for not supported versions (like test dependencies for python 3.2)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:
test_requirements.txt
file (to be used with tox.ini
)[testing]
extras from setup.py
to keep it simpler. If you do not agree, I keep it present.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
.
Merged in tox pull request and added skipping of mongodb tests when mongodb is not running.
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)
tox.ini
with definition of environments for all target python versions. Such environments would be run by default (would be listed in top section)..travis.yml
would be kept as it is now as it runs more extensive set of tests.Possible extensions of proposed solution
.travis.yml
to use what extendedtox.ini
is providing (I have seen couple of such examples). This way automated and local tests could be the same (or very similar).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.