-
Notifications
You must be signed in to change notification settings - Fork 2
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
adding config file for filtering warnings #63
Conversation
@kzqureshi Could you please move the pytest configuration to |
python_files = test_*.py | ||
python_functions = test_* |
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.
Are these two lines really require?
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.
yes in pytest.ini
these are required because these two lines are selecting all the files with test names and then applying the ignore command on the tests.
python_files = test_*.py | ||
python_functions = test_* | ||
filterwarnings = | ||
ignore::DeprecationWarning:traitlets.*: |
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.
ignore::DeprecationWarning:traitlets.*: | |
error | |
ignore::DeprecationWarning:traitlets.*: |
I would like to convert all other warnings to errors (https://docs.pytest.org/en/7.1.x/how-to/capture-warnings.html#controlling-warnings)
python_files = test_*.py | ||
python_functions = test_* | ||
filterwarnings = | ||
ignore::DeprecationWarning:traitlets.*: |
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.
[Note for myself] re-check if the warning is suppressed locally, may need further changes (pytest -W error -W 'ignore: :DeprecationWarning'
seems to work, the warning is raised from dependencies from k3d)
8a560fd
to
82d710b
Compare
Closing in favour of #66 |
'pytest.ini' file has been added to filter the DeprecationWarning