File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,6 @@ def get_next_execution_timestamp(self) -> float:
149149 """
150150 Get the timestamp for the next execution of the callback
151151 This is done using execution total, the interval and the start timestamp
152- :return: datetime
152+ :return: float
153153 """
154154 return self .start_timestamp_monotonic + self .interval .total_seconds () * (self .iterations or 1 )
155-
Original file line number Diff line number Diff line change @@ -778,7 +778,7 @@ def _parse_args(self):
778778 parser .add_argument ("--secrets" , required = False , default = "secrets.json" )
779779 parser .add_argument ("--no-print-metrics" , required = False , action = "store_true" )
780780
781- args , unknown = parser .parse_known_args ()
781+ args , _ = parser .parse_known_args ()
782782 self ._is_fastcheck = args .fastcheck
783783 if args .dsid is None :
784784 # DEV mode
Original file line number Diff line number Diff line change 11import threading
22import time
33import unittest
4- from datetime import datetime , timedelta
4+ from datetime import timedelta
55from unittest .mock import MagicMock , mock_open , patch
66
77import pytest
@@ -387,15 +387,15 @@ def test_fastcheck_exception(self):
387387 extension ._client = MagicMock ()
388388
389389 fastcheck = MagicMock ()
390- fastcheck .side_effect = Exception ("SomeException" )
390+ fastcheck .side_effect = ImportError ("SomeException" )
391391 extension .register_fastcheck (fastcheck )
392- self .assertRaises (Exception , extension ._run_fastcheck )
392+ self .assertRaises (ImportError , extension ._run_fastcheck )
393393
394394 fastcheck .assert_called_once ()
395395 extension ._client .send_status .assert_called_once ()
396396 self .assertEqual (extension ._client .send_status .call_args [0 ][0 ].status , StatusValue .GENERIC_ERROR )
397397 self .assertIn (
398- "Python datasource fastcheck error: Exception ('SomeException')" ,
398+ "Python datasource fastcheck error: ImportError ('SomeException')" ,
399399 extension ._client .send_status .call_args [0 ][0 ].message ,
400400 )
401401
You can’t perform that action at this time.
0 commit comments