Skip to content

Commit 6875ec6

Browse files
rominfcsernazs
authored andcommitted
Start HTTPServer on ephemeral port by default
Fixes #8.
1 parent f6a781e commit 6875ec6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pytest_httpserver/httpserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class HTTPServer: # pylint: disable=too-many-instance-attributes
313313
"""
314314

315315
DEFAULT_LISTEN_HOST = "localhost"
316-
DEFAULT_LISTEN_PORT = 4000
316+
DEFAULT_LISTEN_PORT = 0 # Use ephemeral port
317317

318318
def __init__(self, host=DEFAULT_LISTEN_HOST, port=DEFAULT_LISTEN_PORT, ssl_context: Optional[SSLContext] = None):
319319
"""

0 commit comments

Comments
 (0)