1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Shared pytest fixtures and helpers for eggfetch test suites.
This conftest provides a `_ThreadingHTTPServer` helper so test servers can
handle concurrent requests. Single-threaded ``http.server.HTTPServer`` is
susceptible to head-of-line blocking when one handler sleeps (for example,
a stall/slow-then-hang endpoint). ThreadingMixIn avoids that by spawning a
new OS thread per request.
"""
"""HTTP test server that handles each request on its own thread.
Daemon threads allow the interpreter to exit even if a handler is still
running. ``allow_reuse_address`` makes port reuse predictable across
sequential fixtures in the same test run.
"""
= True
= True
= 32
# Suppress cancelled-stream server noise: clients routinely close
# streaming responses early, so BrokenPipeError /
# ConnectionResetError from `wfile.write` are expected teardown,
# not test failures. All other errors keep the default traceback.
, , =
return