summaryrefslogtreecommitdiff
path: root/tests/float/float_array.py
AgeCommit message (Collapse)Author
2025-06-24py/obj: Fix nan handling in object REPR_C and REPR_D.Yoctopuce dev
CPython math.nan is positive with regards to copysign. The signaling bit (aka sign flag) was incorrectly set. In addition, REPR_C and REPR_D should only use the _true_ nan to prevent system crash in case of hand-crafted floats. For instance, with REPR_C, any nan-like float following the pattern `01111111 1xxxxxxx xxxxxxxx xxxxx1xx` would be switched to an immediate object or a qstr string. When the qstr index is too large, this would cause a crash. This commit fixes the issue, and adds the relevant test cases. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
2023-06-08tests: Replace umodule with module everywhere.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-26tests: Make float and framebuf tests skip or run on big-endian archs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory 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.
2019-10-22tests: Rename "array" module to "uarray".Damien George
2017-06-08tests/float: Convert "sys.exit()" to "raise SystemExit".Damien George
The latter is shorter and simpler because it doesn't require importing the sys module.
2017-03-09tests/float: Make various tests skippable.Paul Sokolovsky
2015-09-11stmhal: fix single precision float printing errorDave Hylands
Fixes #1435.
2014-11-21py: Add support for float/double arrays in array module.Damien George
Addresses issue #981.