Skip to content
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

Missed EncodingWarning #280

Closed
jaraco opened this issue Feb 17, 2023 · 0 comments
Closed

Missed EncodingWarning #280

jaraco opened this issue Feb 17, 2023 · 0 comments

Comments

@jaraco
Copy link
Member

jaraco commented Feb 17, 2023

In v5.10.3, I addressed what I thought was all of the encoding warnings emitted by this test suite.

However, due to the way the warnings framework attempts to localize the usage, there was one warning (with two invocations) that I'd missed:

importlib_resources/tests/test_open.py::OpenDiskTests::test_open_text_FileNotFoundError
importlib_resources/tests/test_open.py::OpenDiskNamespaceTests::test_open_text_FileNotFoundError
  /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/case.py:237: EncodingWarning: 'encoding' argument not specified
    callable_obj(*args, **kwargs)

That warning looks like it's coming from unittest.case:237, but when I looked at that code, I can see that it's just the wrapper created by use of assertRaises. Fortunately, the test names give some hint as to where the missed encoding parameter is (test_open_text_FileNotfoundError).

@jaraco jaraco closed this as completed in 28d26e8 Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant