Skip to content

Missed EncodingWarning #280

Closed
Closed

Description

@jaraco

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).

Activity

  1. added a commit that references this issue on May 28, 2024
    28d26e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions