@@ -246,8 +246,8 @@ def test_get_blackrock_timestamps_ptp(self):
246246
247247 # First 5 PTP clock values (nanoseconds since Unix epoch) read directly from the ns2 file and hardcoded here for testing
248248 ptp_clock_ns_ns2 = np .array (
249- [1688252801327128558 , 1688252801328128518 , 1688252801329128718 ,
250- 1688252801330128558 , 1688252801331128518 ], dtype = "uint64" ,
249+ [1688252801327128558 , 1688252801328128518 , 1688252801329128718 , 1688252801330128558 , 1688252801331128518 ],
250+ dtype = "uint64" ,
251251 )
252252 expected_ns2 = ptp_clock_ns_ns2 .astype ("float64" ) / nanoseconds_per_second
253253 np .testing .assert_array_equal (timestamps [:5 ], expected_ns2 )
@@ -260,8 +260,8 @@ def test_get_blackrock_timestamps_ptp(self):
260260
261261 # First 5 PTP clock values (nanoseconds since Unix epoch) read directly from the ns6 file and hardcoded here for testing
262262 ptp_clock_ns_ns6 = np .array (
263- [1688252801327328740 , 1688252801327361940 , 1688252801327395260 ,
264- 1688252801327428620 , 1688252801327461940 ], dtype = "uint64" ,
263+ [1688252801327328740 , 1688252801327361940 , 1688252801327395260 , 1688252801327428620 , 1688252801327461940 ],
264+ dtype = "uint64" ,
265265 )
266266 expected_ns6 = ptp_clock_ns_ns6 .astype ("float64" ) / nanoseconds_per_second
267267 np .testing .assert_array_equal (timestamps_ns6 [:5 ], expected_ns6 )
@@ -284,16 +284,41 @@ def test_get_blackrock_timestamps_ptp_with_gaps(self):
284284
285285 # First 5 PTP clock values (nanoseconds since Unix epoch) per segment, read directly from file and hardcoded here for testing
286286 first_5_ptp_clock_ns_per_segment = [
287- np .array ([1752531864717743037 , 1752531864717776237 , 1752531864717809677 ,
288- 1752531864717843077 , 1752531864717876277 ], dtype = "uint64" ),
289- np .array ([1752531864739742985 , 1752531864739776305 , 1752531864739809665 ,
290- 1752531864739842945 , 1752531864739876385 ], dtype = "uint64" ),
291- np .array ([1752531864740742986 , 1752531864740776306 , 1752531864740809626 ,
292- 1752531864740842946 , 1752531864740876346 ], dtype = "uint64" ),
287+ np .array (
288+ [
289+ 1752531864717743037 ,
290+ 1752531864717776237 ,
291+ 1752531864717809677 ,
292+ 1752531864717843077 ,
293+ 1752531864717876277 ,
294+ ],
295+ dtype = "uint64" ,
296+ ),
297+ np .array (
298+ [
299+ 1752531864739742985 ,
300+ 1752531864739776305 ,
301+ 1752531864739809665 ,
302+ 1752531864739842945 ,
303+ 1752531864739876385 ,
304+ ],
305+ dtype = "uint64" ,
306+ ),
307+ np .array (
308+ [
309+ 1752531864740742986 ,
310+ 1752531864740776306 ,
311+ 1752531864740809626 ,
312+ 1752531864740842946 ,
313+ 1752531864740876346 ,
314+ ],
315+ dtype = "uint64" ,
316+ ),
293317 ]
294318 # Last PTP clock value (nanoseconds since Unix epoch) of each segment, hardcoded here for testing
295319 last_ptp_clock_ns_per_segment = np .array (
296- [1752531864738776304 , 1752531864739709625 , 1752531864751042999 ], dtype = "uint64" ,
320+ [1752531864738776304 , 1752531864739709625 , 1752531864751042999 ],
321+ dtype = "uint64" ,
297322 )
298323
299324 for seg_index in range (n_segments ):
@@ -311,7 +336,9 @@ def test_get_blackrock_timestamps_ptp_with_gaps(self):
311336 # Verify the gaps between segments exceed the tolerance
312337 for seg_index in range (n_segments - 1 ):
313338 last_ts = last_ptp_clock_ns_per_segment [seg_index ].astype ("float64" ) / nanoseconds_per_second
314- first_ts_next = first_5_ptp_clock_ns_per_segment [seg_index + 1 ][0 ].astype ("float64" ) / nanoseconds_per_second
339+ first_ts_next = (
340+ first_5_ptp_clock_ns_per_segment [seg_index + 1 ][0 ].astype ("float64" ) / nanoseconds_per_second
341+ )
315342 gap_ms = (first_ts_next - last_ts ) * 1000
316343 self .assertGreater (gap_ms , gap_tolerance_ms )
317344
0 commit comments