@@ -64,15 +64,22 @@ The function :meth:`~can.detect_available_configs` can be used to generate a lis
6464 .. testsetup :: ixxat
6565
6666 from unittest.mock import Mock
67- can.detect_available_configs = Mock(side_effect=lambda: [{'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW441489'}, {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'}, {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}])
67+ import can
68+ assert hasattr(can, "detect_available_configs")
69+ can.detect_available_configs = Mock(
70+ "interface",
71+ return_value=[{'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW441489'}, {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'}, {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}],
72+ )
6873
6974 .. doctest :: ixxat
7075
7176 >>> import can
72- >>> print (can.detect_available_configs(" ixxat" ))
73- [{'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW509182'},
74- {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'},
75- {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}]
77+ >>> configs = can.detect_available_configs(" ixxat" )
78+ >>> for config in configs:
79+ ... print (config)
80+ {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW441489'}
81+ {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'}
82+ {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}
7683
7784
7885You may also get a list of all connected IXXAT devices using the function ``get_ixxat_hwids() `` as demonstrated below:
0 commit comments