Skip to content

Commit 671f54b

Browse files
authored
chore: skip test proxy on windows (#240)
1 parent f8ef79f commit 671f54b

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

tests/unit/httpx_client/test_httpx_client.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ async def proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, None]:
4040
yield proxy_info
4141

4242

43-
async def test_proxy(proxy: ProxyInfo, httpbin: str) -> None:
44-
client = HttpxClient()
45-
request = Request(url=f'{httpbin}/status/222', unique_key='42', id='42', user_data={})
46-
47-
async with Statistics() as statistics:
48-
result = await client.crawl(request, None, proxy, statistics)
49-
50-
assert result.http_response.status_code == 222
51-
52-
5343
@pytest.fixture()
5444
async def disabled_proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, None]:
5545
with Proxy(
@@ -66,6 +56,17 @@ async def disabled_proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, Non
6656
yield proxy_info
6757

6858

59+
@pytest.mark.skipif(os.name == 'nt', reason='Skipped on Windows')
60+
async def test_proxy(proxy: ProxyInfo, httpbin: str) -> None:
61+
client = HttpxClient()
62+
request = Request(url=f'{httpbin}/status/222', unique_key='42', id='42', user_data={})
63+
64+
async with Statistics() as statistics:
65+
result = await client.crawl(request, None, proxy, statistics)
66+
67+
assert result.http_response.status_code == 222
68+
69+
6970
@pytest.mark.skipif(os.name == 'nt', reason='Skipped on Windows')
7071
async def test_proxy_disabled(disabled_proxy: ProxyInfo, httpbin: str) -> None:
7172
client = HttpxClient()

0 commit comments

Comments
 (0)