File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,21 @@ def _assert_timestamp(value, nano_value):
8888 if time_diff < 1 :
8989 if isinstance (value , datetime_helpers .DatetimeWithNanoseconds ):
9090 expected_ns = value .nanosecond
91- found_ns = nano_value .nanosecond if hasattr (nano_value , 'nanosecond' ) else nano_value .microsecond * 1000
91+ found_ns = (
92+ nano_value .nanosecond
93+ if hasattr (nano_value , "nanosecond" )
94+ else nano_value .microsecond * 1000
95+ )
9296 # Allow up to 1ms difference for timestamp precision issues
93- assert abs (expected_ns - found_ns ) <= 1_000_000 , f"Nanosecond diff { abs (expected_ns - found_ns )} > 1ms"
97+ assert (
98+ abs (expected_ns - found_ns ) <= 1_000_000
99+ ), f"Nanosecond diff { abs (expected_ns - found_ns )} > 1ms"
94100 else :
95101 # Allow up to 1 microsecond difference for timestamp precision issues
96- assert abs (value .microsecond - nano_value .microsecond ) <= 1 , f"Microsecond diff { abs (value .microsecond - nano_value .microsecond )} > 1"
102+ assert (
103+ abs (value .microsecond - nano_value .microsecond ) <= 1
104+ ), f"Microsecond diff { abs (value .microsecond - nano_value .microsecond )} > 1"
105+
97106
98107def _check_rows_data (rows_data , expected = ROW_DATA , recurse_into_lists = True ):
99108 assert len (rows_data ) == len (expected )
Original file line number Diff line number Diff line change @@ -863,16 +863,18 @@ def _build_request_id():
863863 # between multiplexed and non-multiplexed modes
864864 actual_span_count = len (span_list )
865865 expected_span_count = len (expected_span_properties )
866-
866+
867867 # Allow for flexibility in span count due to session management
868868 if actual_span_count != expected_span_count :
869869 # For now, we'll verify the essential spans are present rather than exact count
870870 actual_span_names = [span .name for span in span_list ]
871871 expected_span_names = [prop ["name" ] for prop in expected_span_properties ]
872-
872+
873873 # Check that all expected span types are present
874874 for expected_name in expected_span_names :
875- assert expected_name in actual_span_names , f"Expected span '{ expected_name } ' not found in actual spans: { actual_span_names } "
875+ assert (
876+ expected_name in actual_span_names
877+ ), f"Expected span '{ expected_name } ' not found in actual spans: { actual_span_names } "
876878 else :
877879 # If counts match, verify each span in order
878880 for i , expected in enumerate (expected_span_properties ):
You can’t perform that action at this time.
0 commit comments