@@ -914,7 +914,9 @@ def test_log_error_standard_log_sink(self, mock_stdout):
914
914
915
915
def test_log_error_framed_log_sink (self ):
916
916
with NamedTemporaryFile () as temp_file :
917
- with bootstrap .FramedTelemetryLogSink (os .open (temp_file .name , os .O_CREAT | os .O_RDWR )) as log_sink :
917
+ with bootstrap .FramedTelemetryLogSink (
918
+ os .open (temp_file .name , os .O_CREAT | os .O_RDWR )
919
+ ) as log_sink :
918
920
err_to_log = bootstrap .make_error ("Error message" , "ErrorType" , None )
919
921
bootstrap .log_error (err_to_log , log_sink )
920
922
@@ -949,7 +951,9 @@ def test_log_error_indentation_standard_log_sink(self, mock_stdout):
949
951
950
952
def test_log_error_indentation_framed_log_sink (self ):
951
953
with NamedTemporaryFile () as temp_file :
952
- with bootstrap .FramedTelemetryLogSink (os .open (temp_file .name , os .O_CREAT | os .O_RDWR )) as log_sink :
954
+ with bootstrap .FramedTelemetryLogSink (
955
+ os .open (temp_file .name , os .O_CREAT | os .O_RDWR )
956
+ ) as log_sink :
953
957
err_to_log = bootstrap .make_error (
954
958
"Error message" , "ErrorType" , [" line1 " , " line2 " , " " ]
955
959
)
@@ -984,7 +988,9 @@ def test_log_error_empty_stacktrace_line_standard_log_sink(self, mock_stdout):
984
988
985
989
def test_log_error_empty_stacktrace_line_framed_log_sink (self ):
986
990
with NamedTemporaryFile () as temp_file :
987
- with bootstrap .FramedTelemetryLogSink (os .open (temp_file .name , os .O_CREAT | os .O_RDWR )) as log_sink :
991
+ with bootstrap .FramedTelemetryLogSink (
992
+ os .open (temp_file .name , os .O_CREAT | os .O_RDWR )
993
+ ) as log_sink :
988
994
err_to_log = bootstrap .make_error (
989
995
"Error message" , "ErrorType" , ["line1" , "" , "line2" ]
990
996
)
@@ -1082,7 +1088,9 @@ def test_create_framed_telemetry_log_sinks(self):
1082
1088
def test_single_frame (self ):
1083
1089
with NamedTemporaryFile () as temp_file :
1084
1090
message = "hello world\n something on a new line!\n "
1085
- with bootstrap .FramedTelemetryLogSink (os .open (temp_file .name , os .O_CREAT | os .O_RDWR )) as ls :
1091
+ with bootstrap .FramedTelemetryLogSink (
1092
+ os .open (temp_file .name , os .O_CREAT | os .O_RDWR )
1093
+ ) as ls :
1086
1094
ls .log (message )
1087
1095
with open (temp_file .name , "rb" ) as f :
1088
1096
content = f .read ()
@@ -1101,7 +1109,9 @@ def test_multiple_frame(self):
1101
1109
first_message = "hello world\n something on a new line!"
1102
1110
second_message = "hello again\n here's another message\n "
1103
1111
1104
- with bootstrap .FramedTelemetryLogSink (os .open (temp_file .name , os .O_CREAT | os .O_RDWR )) as ls :
1112
+ with bootstrap .FramedTelemetryLogSink (
1113
+ os .open (temp_file .name , os .O_CREAT | os .O_RDWR )
1114
+ ) as ls :
1105
1115
ls .log (first_message )
1106
1116
ls .log (second_message )
1107
1117
0 commit comments