Skip to content

test_encoding_warnings failing on pypy #114

Closed
@jaraco

Description

Running the tests on pypy results in this failure:

________________________________________________________ TestPath.test_encoding_warnings _________________________________________________________

self = <tests.test_path.TestPath testMethod=test_encoding_warnings>
alpharep = <zipp.CompleteDirs file=<_io.BytesIO object at 0x0000000128eaa728> mode='w'>

    @unittest.skipIf(
        not getattr(sys.flags, 'warn_default_encoding', 0),
        "Requires warn_default_encoding",
    )
    @pass_alpharep
    def test_encoding_warnings(self, alpharep):
        """EncodingWarning must blame the read_text and open calls."""
        assert sys.flags.warn_default_encoding
        root = zipp.Path(alpharep)
        with self.assertWarns(EncodingWarning) as wc:
            root.joinpath("a.txt").read_text()
>       assert __file__ == wc.filename
E       AssertionError: assert '/Users/jarac.../test_path.py' == '/Users/jarac...p/__init__.py'
E         
E         - /Users/jaraco/code/jaraco/zipp/zipp/__init__.py
E         ?                                ^^^^ ^^^^^  ^
E         + /Users/jaraco/code/jaraco/zipp/tests/test_path.py
E         ?                                ^^^^^ ^^^  ^^^^

tests/test_path.py:193: AssertionError

The last time these tests passed was about 6 months ago.

Activity

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