-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Testing with Tox #4481
[ENH] Testing with Tox #4481
Conversation
self.assertLessEqual(len(inliers), 136) | ||
self.assertGreaterEqual(len(outliers), 14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to use assertIn
here (like you did below)?
I have some trouble running this locally, so I would go over it together with you when we get a chance. |
Codecov Report
@@ Coverage Diff @@
## master #4481 +/- ##
==========================================
+ Coverage 83.18% 83.62% +0.44%
==========================================
Files 268 274 +6
Lines 53997 58375 +4378
==========================================
+ Hits 44917 48819 +3902
- Misses 9080 9556 +476 |
If anyone else wants to take a look please do. Otherwise I am in favor of merging this. |
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.