Skip to content

Commit e690279

Browse files
committed
simplify unittest skip condition
1 parent 364183a commit e690279

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/back2back_test.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,8 @@ class BasicTestSocketCan(Back2BackTestCase):
303303

304304
# this doesn't even work on Travis CI for macOS; for example, see
305305
# https://travis-ci.org/github/hardbyte/python-can/jobs/745389871
306-
@unittest.skipUnless(
307-
(IS_UNIX and not (IS_CI and IS_OSX)) or IS_WINDOWS,
308-
"only supported on Unix and Windows systems (but not on macOS at Travis CI and GitHub Actions)",
306+
@unittest.skipIf(IS_CI and IS_OSX,
307+
"not supported for macOS CI",
309308
)
310309
class BasicTestUdpMulticastBusIPv4(Back2BackTestCase):
311310
INTERFACE_1 = "udp_multicast"
@@ -320,9 +319,8 @@ def test_unique_message_instances(self):
320319

321320
# this doesn't even work for loopback multicast addresses on Travis CI; for example, see
322321
# https://travis-ci.org/github/hardbyte/python-can/builds/745065503
323-
@unittest.skipUnless(
324-
(IS_UNIX and not (IS_TRAVIS or (IS_CI and IS_OSX))) or IS_WINDOWS,
325-
"only supported on Unix and Windows systems (but not on Travis CI; and not on macOS at GitHub Actions)",
322+
@unittest.skipIf(IS_CI and IS_OSX,
323+
"not supported for macOS CI",
326324
)
327325
class BasicTestUdpMulticastBusIPv6(Back2BackTestCase):
328326
HOST_LOCAL_MCAST_GROUP_IPv6 = "ff11:7079:7468:6f6e:6465:6d6f:6d63:6173"

0 commit comments

Comments
 (0)