File: fix-test-hostname.patch

package info (click to toggle)
pyartnet 2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 668 kB
  • sloc: python: 1,845; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 914 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Fix test_hostname for isolated build environments
 In Debian build chroots (sbuild/pbuilder), network resolution often
 fails with a different error code (-2) than expected by upstream (-3).
 This patch adds the missing error string to the test's allowed values.
Author: Arian Ott <arian.ott@ieee.org>
Forwarded: no
Last-Update: 2026-01-12
Index: pyartnet/tests/test_base/test_network.py
===================================================================
--- pyartnet.orig/tests/test_base/test_network.py
+++ pyartnet/tests/test_base/test_network.py
@@ -10,6 +10,7 @@ async def test_hostname() -> None:
     assert str(e.value) in (
         'Cannot resolve hostname "does_not_exist"! 11001: getaddrinfo failed'
         'Cannot resolve hostname "does_not_exist"! -3: Temporary failure in name resolution'
+        'Cannot resolve hostname "does_not_exist"! -2: Name or service not known'
     )