Skip to content

Tests fail with python 3.12 and higher #16

@jelly

Description

@jelly
    def test_uri2fsn():
        # type: () -> None

        if sys.platform != "win32":
            with pytest.raises(ValueError):
                assert uri2fsn(u"file:///%00")
            with pytest.raises(ValueError):
                assert uri2fsn("file:///%00")
            assert uri2fsn("file:///foo") == fsnative(u"/foo")
            assert uri2fsn(u"file:///foo") == fsnative(u"/foo")
            assert isinstance(uri2fsn("file:///foo"), fsnative)
            assert isinstance(uri2fsn(u"file:///foo"), fsnative)
            assert \
                uri2fsn("file:///foo-%E1%88%B4") == path2fsn(b"/foo-\xe1\x88\xb4")
>           assert uri2fsn("file:NOPE") == fsnative(u"/NOPE")
E           AssertionError: assert 'PE' == '/NOPE'
E
E             - /NOPE
E             + PE
>>> urlunparse(parsed)
'file:NOPE'
>>> urlunparse(parsed)[7:]
'PE'

So these days Python no longer adds // automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions