Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #4324
Invoking
python setup.py test
is now deprecated. Judging by this comment pypa/setuptools#1684 (comment), authors of setuptools have discouraged this for quite some time now.They suggest that Tox is used as a new "frontend" for running project tests. While this is not strictly necessary for us to do (we can use unittest/pytest directly) it is nice because we can define the steps for building and testing Orange in one place. This means that by invoking tests with Tox we can run them on any CI (or locally) in a python environment that is defined and created by this tool. Also, it seems that using Tox is becoming a trend in all major python projects.
Note that this adds a bit of overhead. It creates new .tox folder that is used to create new test environments. If one would like to bypass Tox entirely you need to use unittest/pytest or invoking setup.py while it lasts :).
Description of changes
New configuration file tox.ini is added.
Some of the steps that are defined and ready to use in this PR:
tox -e py36/py37/py38
will run entire Orange test suit on python 3.6/3.7/3.8 (if it's installed on you machine)tox -e coverage
will run tests and output coverage report.tox -e build_doc
will build documentation and fail if something is broken.tox -e add-ons
will build orange with your changes, install some of the supported add-ons (we can extend this list) and run test discovery in orangecontrib folder.See #4482 how tox can be used in CI configuration.