File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ def get_api_version(self):
322
322
def check_api_version (self ):
323
323
apv = self .get_api_version ()
324
324
if apv < MIN_PCAN_API_VERSION :
325
- raise CanInitializationError (
325
+ log . warning (
326
326
f"Minimum version of pcan api is { MIN_PCAN_API_VERSION } ."
327
327
f" Installed version is { apv } . Consider upgrade of pcan basic package"
328
328
)
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ def test_bus_creation_fd(self) -> None:
66
66
self .mock_pcan .Initialize .assert_not_called ()
67
67
self .mock_pcan .InitializeFD .assert_called_once ()
68
68
69
- def test_api_version_error (self ) -> None :
69
+ def test_api_version_low (self ) -> None :
70
70
self .PCAN_API_VERSION_SIM = "1.0"
71
- with self .assertRaises ( CanInitializationError ) :
71
+ with self .assertLogs ( 'can.pcan' , level = 'WARNING' ) as cm :
72
72
self .bus = can .Bus (bustype = "pcan" )
73
73
74
74
def test_api_version_read_fail (self ) -> None :
You can’t perform that action at this time.
0 commit comments