Fix Python and Pylint warnings in windows_testing.py#116
Open
gilles-peskine-arm wants to merge 6 commits intoMbed-TLS:mainfrom
Open
Fix Python and Pylint warnings in windows_testing.py#116gilles-peskine-arm wants to merge 6 commits intoMbed-TLS:mainfrom
gilles-peskine-arm wants to merge 6 commits intoMbed-TLS:mainfrom
Conversation
It worked as intended because the string is a literal and CPython
(which our CI uses) merges string literals at compile time. But it was
fragile with respect to code changes or using another Python
implementation.
This fixes the diagnostic emitted by python when running the script:
```
windows_testing.py:185: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if name is not "Results":
```
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Fix regex strings missing an r prefix, and a docstring containing what was intended to be a literal backslash. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
When re-raising an exception, show the original backtrace, independently of any logging. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
In all of these cases, one test in a series has failed, so we make a note of the failure and continue. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
tgonzalezorlandoarm
suggested changes
Aug 10, 2023
tgonzalezorlandoarm
left a comment
There was a problem hiding this comment.
Very minor comment, LGTM otherwise.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a warning that appears whenever running
windows_testing.py, including in CI logs:Also fix a few things reported by Pylint. I do not try to be exhaustive there, I just fixed some slightly dodgy code and silenced a few warnings for which I could do so quickly and without risk. Passing pylint is out of scope of this pull request.
CI run: