-
Notifications
You must be signed in to change notification settings - Fork 102
BUG: Fix Travis Detection #292
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
Conversation
- The test should pass on travis.
- Try different solution to travis checks
- Previous setting
test_kather_dataset_default test
- Try different solution to detect Travis
- Set env variable and check
- Try if ON_TRAVIS exists
- Change check for travis.
- Remove ON_TRAVIS variable.
- Revert back the changes
- Revert changes on .travis.yml
- Pass environment variables from travis to tox
Codecov Report
@@ Coverage Diff @@
## develop #292 +/- ##
========================================
Coverage 99.82% 99.82%
========================================
Files 53 53
Lines 5004 5004
Branches 823 823
========================================
Hits 4995 4995
Misses 2 2
Partials 7 7
Continue to review full report at Codecov.
|
- Fix the test_travis_detection to run locally
test_kather_dataset_default test| on_travis = utils.env_detection.running_on_travis() | ||
| if "ON_TRAVIS" in os.environ: | ||
| assert on_travis | ||
| else: | ||
| assert not on_travis |
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.
Not sure about this. I think it was better before simply checking that it returns. Maybe could add a check that it is a boolean value. This looks like it will easily break as a test and isn't actually testing anything usefully.
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.
utils.env_detection.running_on_travis() is dependent on Travis variables. I think it would be unwise to write a test which is relying on the same variables it is testing. So I have forced a test which is relying on a variable which is manually added in case the other variables fail.
This will allow the test to pass locally as well otherwise tests will fail locally.
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.
Addressed in this commit 2276838
- Use a different source of truth to run test
- Try pwd to test travis.
- Fix test to to skip on Windows
- Remove ON_TRAVIS
Uh oh!
There was an error while loading. Please reload this page.