From accce7fdef89922e3925cf28bd998e41f8e564f4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 17 Feb 2025 09:57:44 +0100 Subject: [PATCH] Update urlmatch tests for Python fixes https://github.com/python/cpython/issues/78541 https://github.com/python/cpython/issues/105704 https://github.com/python/cpython/pull/129418 --- tests/unit/utils/test_urlmatch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/utils/test_urlmatch.py b/tests/unit/utils/test_urlmatch.py index 85910fa17..b19e508f5 100644 --- a/tests/unit/utils/test_urlmatch.py +++ b/tests/unit/utils/test_urlmatch.py @@ -14,13 +14,14 @@ Currently not tested: """ import string +import urllib.parse import pytest import hypothesis import hypothesis.strategies as hst from qutebrowser.qt.core import QUrl -from qutebrowser.utils import urlmatch +from qutebrowser.utils import urlmatch, utils # FIXME:v4 (lint): disable=line-too-long @@ -76,7 +77,10 @@ _INVALID_IP_MESSAGE = ( pytest.param( "http://[2607:f8b0:4005:805::200e]]/*", "Invalid IPv6 URL", - marks=pytest.mark.xfail(reason="https://bugs.python.org/issue34360"), + marks=pytest.mark.xfail( + not utils.raises(ValueError, urllib.parse.urlparse, "http://[::1]]"), + reason="https://github.com/python/cpython/issues/105704" + ), id='host-ipv6-two-closing', ), # Two open brackets (`[[`).