mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-07 07:15:00 +01:00
[test] Skip source address tests if the address cannot be bound to (#8900)
Fixes https://github.com/yt-dlp/yt-dlp/issues/8890 Authored by: coletdjnz
This commit is contained in:
parent
50e06e21a6
commit
69d3191495
4 changed files with 16 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ import sys
|
|||
|
||||
import pytest
|
||||
|
||||
from test.helper import verify_address_availability
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
import http.client
|
||||
|
|
@ -227,6 +229,7 @@ class TestWebsSocketRequestHandlerConformance:
|
|||
@pytest.mark.parametrize('handler', ['Websockets'], indirect=True)
|
||||
def test_source_address(self, handler):
|
||||
source_address = f'127.0.0.{random.randint(5, 255)}'
|
||||
verify_address_availability(source_address)
|
||||
with handler(source_address=source_address) as rh:
|
||||
ws = validate_and_send(rh, Request(self.ws_base_url))
|
||||
ws.send('source_address')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue