test: delete slow, timing-based and redundant tests

This commit is contained in:
imSp4rky
2026-12-05 15:20:05 -07:00
parent 783a2fc185
commit 3a0a74e694
292 changed files with 153 additions and 15174 deletions
+1 -12
View File
@@ -30,7 +30,7 @@ from unshackle.core.proxies.controld import (
local_proxy,
parse_a_records,
)
from unshackle.core.proxies.resolve import REGION_QUERY, resolve_proxy, resolve_proxy_value
from unshackle.core.proxies.resolve import resolve_proxy
from unshackle.core.utilities import get_free_port
pytestmark = pytest.mark.unit
@@ -457,14 +457,3 @@ def test_a_server_gets_the_typed_proxy_only_when_this_machine_resolved_it_to_loo
assert server_proxy_arg({"proxy": "https://u:p@ca1.example:89", "proxy_arg": "nordvpn:ca"}) == (
"https://u:p@ca1.example:89"
)
@pytest.mark.parametrize("query", ["ca", "us:seattle", "us-ny", "uk1", "yul", "jfk", "res_yyz", "nordvpn:ca"])
def test_a_region_query_matches(query: str) -> None:
assert REGION_QUERY.fullmatch(query)
@pytest.mark.parametrize("uri", ["nas:3128", "localhost:8080", "proxy.example.com:8080", "1.2.3.4:8080", "us:1080"])
def test_a_host_and_port_is_never_a_region_query(uri: str) -> None:
resolved = resolve_proxy_value(uri, [])
assert resolved.uri == uri and resolved.query is None