We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2121c commit 62addadCopy full SHA for 62addad
test/test_kvaser.py
@@ -277,6 +277,19 @@ def test_bus_get_stats(self):
277
self.assertTrue(canlib.canGetBusStatistics.called)
278
self.assertIsInstance(stats, canlib.structures.BusStatistics)
279
280
+ def test_bus_no_init_access(self):
281
+ canlib.canOpenChannel.reset_mock()
282
+ bus = can.Bus(interface="kvaser", channel=0, no_init_access=True)
283
+
284
+ self.assertGreater(canlib.canOpenChannel.call_count, 0)
285
+ for call in canlib.canOpenChannel.call_args_list:
286
+ self.assertEqual(
287
+ call[0][1] & constants.canOPEN_NO_INIT_ACCESS,
288
+ constants.canOPEN_NO_INIT_ACCESS
289
+ )
290
291
+ bus.shutdown()
292
293
@staticmethod
294
def canGetNumberOfChannels(count):
295
count._obj.value = 2
0 commit comments