Ignore certain warnings and supply pytest args as list not string #22
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.
Description
This ignores 3 particular warnings that show up in testing and cause ska_testr fails. The warnings and reasoning are documented in the code.
It also updates handing of args in something like
pytest setup.py test --args='-k test_blah -v'
. This previously passed that string to pytest, which had been raising a deprecation warning but is now failing in pytest 5.4.Testing
The following testing was done for
ska3-shiny
andska3-flight
environments. In both casesI put this version of
testr
intoPYTHONPATH
and then did the following testing for the package Chandra.Maneuver that shows at 2 of the warnings. This had previously been failing the ska_testr in shiny because of the warnings.In the git repo for Chandra.Maneuver I moved
pytest.ini
away for testing to be sure that is not influencing the results.The point to note in the test logs below is the absence of any warnings in the pytest output.
ska_testr
python setup.py test
python setup.py test --args='-v -k versus'
python -c 'import Chandra.Maneuver; Chandra.Maneuver.test()'
python -c "import Chandra.Maneuver; Chandra.Maneuver.test('-v', '-k', 'versus')"