Add a GitHub Action to lint and test Python code #13
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.
The code in this repo is vendored into V8 and contains the only Python Syntax Errors in the V8 codebase that ruff is able to find. So let's put some automated testing in place.
Fixes #8 (This was broken in #4.)
Fixes #10 (This should have been merged when it was proposed.)
Fixes #11 (The solution in #10 was better.)
Similar to #7 (This should have been merged when it was proposed.)
Test results: https://github.com/cclauss/test262-harness-py/actions
Fix Python Syntax Errors:
Use
python-modernize
to remove Python 3 syntax errors without breaking compatibility with legacy Python 2.pytest initially failed because of #8 so...
parseTestRecord.py
: RestorestripHeader
which was removed without running the tests in Incorporate changes from test262/41edfcebce1a85096 #4_monkeyYaml.py
change fromNone
-->0
proposed Make monkeyYaml Python3 compatible #10%
pytest --ignore=test/test_common.py --ignore=test/test_parseTestRecord.py
My bet would be that the remaining failing tests in
test/test_common.py
andtest/test_parseTestRecord.py
could be fixed by completely or partially reverting #4@erights @jugglinmike @richardlau @gsnedders @mi-ac Your reviews, please.