File: 0001-Skip-some-network-test.patch

package info (click to toggle)
python-zeroconf 0.147.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,380 kB
  • sloc: python: 15,356; makefile: 23
file content (68 lines) | stat: -rw-r--r-- 2,993 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Sun, 24 Oct 2021 15:45:35 +0900
Subject: Skip some network test

Forwarded: not-needed

Skip some tests because of Debian builder works on restricted network,
and its network connection is not so reliable.
---
 tests/services/test_types.py | 1 +
 tests/test_core.py           | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/tests/services/test_types.py b/tests/services/test_types.py
index 6329224..bd5696e 100644
--- a/tests/services/test_types.py
+++ b/tests/services/test_types.py
@@ -91,6 +91,7 @@ def test_integration_with_listener_v6_records(disable_duplicate_packet_suppressi
 
 @unittest.skipIf(not has_working_ipv6() or sys.platform == "win32", "Requires IPv6")
 @unittest.skipIf(os.environ.get("SKIP_IPV6"), "IPv6 tests disabled")
+@unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
 def test_integration_with_listener_ipv6(disable_duplicate_packet_suppression):
     type_ = "_test-listenv6ip-type._tcp.local."
     name = "xxxyyy"
diff --git a/tests/test_core.py b/tests/test_core.py
index 8c53d20..712ff7c 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -57,12 +57,14 @@ def threadsafe_query(
 
 
 class Framework(unittest.TestCase):
+    @unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
     def test_launch_and_close(self):
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.All)
         rv.close()
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.Default)
         rv.close()
 
+    @unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
     def test_launch_and_close_context_manager(self):
         with r.Zeroconf(interfaces=r.InterfaceChoice.All) as rv:
             assert rv.done is False
@@ -78,6 +80,7 @@ class Framework(unittest.TestCase):
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.Default, unicast=True)
         rv.close()
 
+    @unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
     def test_close_multiple_times(self):
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.Default)
         rv.close()
@@ -85,6 +88,7 @@ class Framework(unittest.TestCase):
 
     @unittest.skipIf(not has_working_ipv6(), "Requires IPv6")
     @unittest.skipIf(os.environ.get("SKIP_IPV6"), "IPv6 tests disabled")
+    @unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
     def test_launch_and_close_v4_v6(self):
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.All, ip_version=r.IPVersion.All)
         rv.close()
@@ -98,6 +102,7 @@ class Framework(unittest.TestCase):
 
     @unittest.skipIf(not has_working_ipv6(), "Requires IPv6")
     @unittest.skipIf(os.environ.get("SKIP_IPV6"), "IPv6 tests disabled")
+    @unittest.skipIf(os.environ.get("DEBIAN_TEST"), "disabled by Debian builder")
     def test_launch_and_close_v6_only(self):
         rv = r.Zeroconf(interfaces=r.InterfaceChoice.All, ip_version=r.IPVersion.V6Only)
         rv.close()