diff options
| author | Kevin Matocha <kmatocha@icloud.com> | 2021-03-17 09:30:51 -0500 |
|---|---|---|
| committer | Kevin Matocha <kmatocha@icloud.com> | 2021-03-17 09:30:51 -0500 |
| commit | ef91e1752c233e45bfa898eb67caab44f1b02313 (patch) | |
| tree | 9b6f26eb1bd0d54143b4d174cec720dcaca8065e /tests/float/float_struct.py | |
| parent | 870dadc85adce4f10fa57dda1d11dda48b25dbc1 (diff) | |
| parent | bfc8c89536e12dba0cc9adc0065819d730bb0983 (diff) | |
merge upstream/main
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")) |
