Skip to content

Commit 00b972c

Browse files
authored
Fix logic reversal in apple_p2p test (#681)
1 parent d2b5e51 commit 00b972c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ def test_launch_and_close_v6_only(self):
100100
rv = r.Zeroconf(interfaces=r.InterfaceChoice.Default, ip_version=r.IPVersion.V6Only)
101101
rv.close()
102102

103-
@unittest.skipIf(sys.platform != 'darwin', reason="apple_p2p only available on mac")
104-
def test_launch_and_close_apple_p2p(self):
105-
rv = r.Zeroconf(apple_p2p=True)
106-
rv.close()
107-
108-
@unittest.skipIf(sys.platform == 'darwin', reason="apple_p2p available on mac")
109-
def test_launch_and_close_apple_p2p(self):
103+
@unittest.skipIf(sys.platform == 'darwin', reason="apple_p2p failure path not testable on mac")
104+
def test_launch_and_close_apple_p2p_not_mac(self):
110105
with pytest.raises(RuntimeError):
111106
r.Zeroconf(apple_p2p=True)
112107

108+
@unittest.skipIf(sys.platform != 'darwin', reason="apple_p2p happy path only testable on mac")
109+
def test_launch_and_close_apple_p2p_on_mac(self):
110+
rv = r.Zeroconf(apple_p2p=True)
111+
rv.close()
112+
113113
def test_handle_response(self):
114114
def mock_incoming_msg(service_state_change: r.ServiceStateChange) -> r.DNSIncoming:
115115
ttl = 120

0 commit comments

Comments
 (0)