File: use-localhost-in-tests.patch

package info (click to toggle)
fsspec 2025.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,200 kB
  • sloc: python: 24,285; makefile: 31; sh: 18
file content (19 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Use explicit localhost in tests
 Use explicit 127.0.01 in tests to avoid use hostname, that avoid fail and
 is reproducible.
Author: Emmanuel Arias
Forwarded: no
Last-Update: 2024-12-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/fsspec/tests/conftest.py
+++ b/fsspec/tests/conftest.py
@@ -181,7 +181,7 @@
 
 @contextlib.contextmanager
 def serve():
-    server_address = ("", 0)
+    server_address = ("127.0.0.1", 0)
     httpd = HTTPServer(server_address, HTTPTestHandler)
     th = threading.Thread(target=httpd.serve_forever)
     th.daemon = True