Skip to content

test_encoding_warnings failing on pypy #114

Closed
@jaraco

Description

@jaraco

Running the tests on pypy results in this failure:

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">
________________________________________________________ TestPath.test_encoding_warnings _________________________________________________________

self = 
alpharep =  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.

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