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 f1c5c0b commit 8f0136aCopy full SHA for 8f0136a
test/test_pcan.py
@@ -68,8 +68,16 @@ def test_bus_creation_fd(self) -> None:
68
69
def test_api_version_low(self) -> None:
70
self.PCAN_API_VERSION_SIM = "1.0"
71
- with self.assertLogs('can.pcan', level='WARNING') as cm:
+ with self.assertLogs("can.pcan", level="WARNING") as cm:
72
self.bus = can.Bus(bustype="pcan")
73
+ found_version_warning = False
74
+ for i in cm.output:
75
+ if "version" in i and "pcan" in i:
76
+ found_version_warning = True
77
+ self.assertTrue(
78
+ found_version_warning,
79
+ f"No warning was logged for incompatible api version {cm.output}",
80
+ )
81
82
def test_api_version_read_fail(self) -> None:
83
self.mock_pcan.GetValue = Mock(return_value=(PCAN_ERROR_ILLOPERATION, None))
0 commit comments