Closed feng-j678 closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.08%. Comparing base (
0824ba8
) to head (8195ee9
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
[x] address the failing test case (test_write_event_msg_size_limit_char_more_than_1_bytes) in py27 that it can't handle (€) 3 bytes ascii char: Non-ASCII (€) character in file line, but no encoding declared; [x] modify the test using unicode char ("a\u20acbc" ) as input instead of € [x] modify the last assertion checking the message length is less than and equal to the accept limit instead of mathematically calculating the expected message vs the actual message content. in py27, it is recognizing the above unicode as 9 bytes, but py3 recognize it as 4 bytes, therefore the calculation in the last assertion never passed. [x] remove € in __set_up_patches_func() Test_StatusHandlerTruncation.py [x] the reason for that assertion change was the unicode as 9 bytes in py2, but py3 recognize it as 4 bytes, so the calculation in the that assertion will never passed, it's very difficult to get the exact mathematical result for both. so we went with using the upper and lower bound limit in encoding to assert the truncation is applied and it's within a reasonable byte range