Azure / LinuxPatchExtension

Microsoft Azure VM Guest Linux Patch Extension
Apache License 2.0
10 stars 8 forks source link

Fix/unicode in py27 utests #234

Closed feng-j678 closed 1 month ago

feng-j678 commented 8 months ago

with the fix for unicodeerror using euro symbol in unit test, py27 will throw the below error when running utest locally because locally py27 will not auto recognize/encode those char as in py3, though the cicd pipeline will not throw any errors and process the unit test as expected, see pictures below:

image

cicd pipeline before code change using the pr1reduce-status_file as example since it has master code merged in : image

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 22.85714% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 30.80%. Comparing base (9481da6) to head (af4f867). Report is 3 commits behind head on master.

:exclamation: Current head af4f867 differs from pull request most recent head 1d90bce. Consider uploading reports for the commit 1d90bce to get more accurate results

Files Patch % Lines
src/core/tests/Test_TelemetryWriterBadUnicode.py 21.87% 25 Missing :warning:
src/core/src/service_interfaces/TelemetryWriter.py 33.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #234 +/- ## =========================================== - Coverage 90.79% 30.80% -60.00% =========================================== Files 91 89 -2 Lines 15585 15172 -413 =========================================== - Hits 14151 4674 -9477 - Misses 1434 10498 +9064 ``` | [Flag](https://app.codecov.io/gh/Azure/LinuxPatchExtension/pull/234/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [python27](https://app.codecov.io/gh/Azure/LinuxPatchExtension/pull/234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `30.80% <22.85%> (-60.00%)` | :arrow_down: | | [python39](https://app.codecov.io/gh/Azure/LinuxPatchExtension/pull/234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `30.80% <22.85%> (-60.00%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.