Skip to content

Adds an incorrect trailing slash to file: base URL #38

Description

@andersk
>>> urlstd.parse.URL("", "file:///path/page.html").href
'file:///path/page.html/'

The expected result is 'file:///path/page.html' without an extra trailing slash. This also seems to manifest as two failing tests in the test suite:

_________________________________________________________ test_url[expected527] __________________________________________________________
tests/wpt/test_url_constructor.py:28: in test_url
    assert url.href == expected["href"], msg
E   AssertionError: Parsing: <> against <file:///test?test#test>
E   assert 'file:///test/?test' == 'file:///test?test'
E     - file:///test?test
E     + file:///test/?test
E     ?             +
_________________________________________________________ test_url[expected528] __________________________________________________________
tests/wpt/test_url_constructor.py:28: in test_url
    assert url.href == expected["href"], msg
E   AssertionError: Parsing: <file:> against <file:///test?test#test>
E   assert 'file:///test/?test' == 'file:///test?test'
E     - file:///test?test
E     + file:///test/?test
E     ?             +

So I assume you’re aware of this, but maybe you haven’t noticed because of continue-on-error: true in the GitHub Actions workflow?

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