diff options
| author | Jeff Epler <jeff@adafruit.com> | 2021-03-15 13:50:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-15 13:50:49 -0500 |
| commit | 05ed179e11599dd45a76dfb14ecf624d0ff96d68 (patch) | |
| tree | a046c6d1f117814168150484ed1bf7840d3400d7 /tests/float/float_struct.py | |
| parent | 3cbff45f9aac5ea2855bbc888083d356a91c80fe (diff) | |
| parent | f9b4189b4c640823dabb76de8effd2a836da2eb0 (diff) | |
Merge pull request #4362 from microDev1/code-formatting
Add code formatting and translations check
Diffstat (limited to 'tests/float/float_struct.py')
| -rw-r--r-- | tests/float/float_struct.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/float/float_struct.py b/tests/float/float_struct.py index dd7a418ad..18893af0e 100644 --- a/tests/float/float_struct.py +++ b/tests/float/float_struct.py @@ -8,10 +8,10 @@ except ImportError: print("SKIP") raise SystemExit -i = 1. + 1/2 +i = 1.0 + 1 / 2 # TODO: it looks like '=' format modifier is not yet supported # for fmt in ('f', 'd', '>f', '>d', '<f', '<d', '=f', '=d'): -for fmt in ('f', 'd', '>f', '>d', '<f', '<d'): +for fmt in ("f", "d", ">f", ">d", "<f", "<d"): x = struct.pack(fmt, i) v = struct.unpack(fmt, x)[0] - print('%2s: %.17f - %s' % (fmt, v, (i == v) and 'passed' or 'failed')) + print("%2s: %.17f - %s" % (fmt, v, (i == v) and "passed" or "failed")) |
