Skip to content

Commit 65bde81

Browse files
MattWoodheadzariiii9003
authored andcommitted
Update test_interface_ixxat.py
1 parent 0fbd867 commit 65bde81

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_interface_ixxat.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ def setUp(self):
5151
raise unittest.SkipTest("not available on this platform")
5252

5353
def test_bus_creation(self):
54+
try:
55+
configs = can.detect_available_configs("ixxat")
56+
if configs:
57+
for interface_kwargs in configs:
58+
bus = can.Bus(**interface_kwargs)
59+
bus.shutdown()
60+
else:
61+
raise unittest.SkipTest("No adapters were detected")
62+
except can.CanInterfaceNotImplementedError:
63+
raise unittest.SkipTest("not available on this platform")
64+
65+
def test_bus_creation_incorrect_channel(self):
5466
# non-existent channel -> use arbitrary high value
5567
with self.assertRaises(can.CanInitializationError):
5668
can.Bus(interface="ixxat", channel=0xFFFF)

0 commit comments

Comments
 (0)