Skip to content

Commit

Permalink
Ignore some warnings
Browse files Browse the repository at this point in the history
We do not have control about any of these warnings except the last one.
And that one is harmless in a testing context.

Maintaining a list of these filters is cumbersome. I wish there was some
way to automatically ignore all warnings caused by third party code, but
unfortunately I don't think there currently is. I've opened
pytest-dev/pytest#6191
to discuss this.

I still think it is worthwhile to filter these warnings, because
otherwise they drown out those warnings that are actually relevant.
  • Loading branch information
timokau authored and kiudee committed Nov 18, 2019
1 parent ba03234 commit e1ce0b5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
[pytest]
addopts = --doctest-modules
filterwarnings =
; caused by keras
ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated.*:DeprecationWarning
; caused by theano
ignore:Importing from numpy.testing.nosetester is deprecated since 1.15.0.*:DeprecationWarning

; caused by scikit-optimize (https://github.com/scikit-optimize/scikit-optimize/issues/774). Cannot currently be reliably ignored, but this will work in the future (https://github.com/scikit-learn/scikit-learn/issues/9857)
ignore:sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib.*:FutureWarning

; not sure what causes these, but its not cs-ranking
ignore:Keyword argument varnames renamed to var_names.*:DeprecationWarning
ignore:The join_axes-keyword is deprecated.*:FutureWarning

; pymc complains about small sample size, which is fine for tests
ignore:The number of samples is too small to check convergence reliably:UserWarning

0 comments on commit e1ce0b5

Please sign in to comment.