-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
tests: Format with black #5785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Format with black #5785
Conversation
I'm guessing that this was intentionally omitted form the recent formatting changes for a reason, but I thought I would try it anyway. |
Yes, because it was a big change and needed to be thoroughly looked over, precisely because some tests are actually testing the syntax, eg single vs double quote on strings. I'm happy to make this change, it keeps things consistent, but would want to go through the changes to make sure everything is OK (and CI is failing at the moment...). |
ab21f40
to
e79db79
Compare
I've updated this to |
13d7dbe
to
dc08bd2
Compare
Instead of excluding specific tests in |
I tried this but it causes errors:
So I don't think we don't have a choice on the repl files. |
32db35a
to
e9d276e
Compare
I've added an extra commit to fix the one line of code coverage that was lost. The qemu-arm test is failing on these two lines in print(int(14187745.0))
print("%d" % 14187745.0) which prints
When the |
This adds the python files in the tests/ directory to be formatted with ./tools/codeformat.py. basics/ is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
Since automatically formatting tests with black, we have lost one line of code coverage. This adds an explicit test to ensure we are testing the case that is no longer covered implicitly.
It looks like the qemu-arm failure is due to #5831, so I've worked around it with |
floating point issue is addressed in #5832 |
go into safe mode with a useful message if no CIRCUITPY
This adds the python files in the
tests/
directory to be formatted with./tools/codeformat.py
.In a few places
# fmt: off
/# fmt: on
was used where the code had special formatting for readability or where the test was actually testing the specific formatting.