summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/float1.py
Commit message (Collapse)AuthorAge
* all: Update Python formatting to latest Black version 22.1.0.Damien George2022-02-02
| | | | Signed-off-by: Damien George <damien@micropython.org>
* tests: Format all Python code with black, except tests in basics subdir.David Lechner2020-03-30
| | | | | | | | | | 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.
* tests/basics: Add tests for equality between bool and int/float/complex.Damien George2020-02-11
| | | | | False/True should be implicitly converted to 0/1 when compared with numeric types.
* py/objfloat: Allow float() to parse anything with the buffer protocol.Damien George2017-11-21
| | | | This generalises and simplifies the code and follows CPython behaviour.
* py/formatfloat: Don't print the negative sign of a NaN value.Damien George2017-10-10
| | | | NaN may have the sign bit set but it has no meaning, so don't print it out.
* py/obj: Fix comparison of float/complex NaN with itself.Damien George2017-09-04
| | | | | | | | | IEEE floating point is specified such that a comparison of NaN with itself returns false, and Python respects these semantics. This patch makes uPy also have these semantics. The fix has a minor impact on the speed of the object-equality fast-path, but that seems to be unavoidable and it's much more important to have correct behaviour (especially in this case where the wrong answer for nan==nan is silently returned).
* tests/float: Add tests for zero to a negative power.Damien George2017-02-03
|
* tests: Add tests to improve coverage of runtime.c.Rami Ali2016-12-21
|
* tests/float: Add test for parsing a float from an empty string.Damien George2016-09-27
|
* py/lexer: Properly classify floats that look like hex numbers.Damien George2015-09-07
| | | | Eg 0e0 almost looks like a hex number but in fact is a float.
* py: Implement mp_format_float for doubles and use where appropriatestijn2015-05-17
| | | | | | | This allows using (almost) the same code for printing floats everywhere, removes the dependency on sprintf and uses just snprintf and applies an msvc-specific fix for snprintf in a single place so nan/inf are now printed correctly.
* py: Fix printing of "inf" and "nan" floating point values.Damien George2015-04-22
|
* tests: Add tests to exercise lexer; and some more complex number tests.Damien George2015-04-04
|
* tests: Add missing tests for builtins, and many other things.Damien George2015-04-04
|
* tests: Add tests for SyntaxError, TypeError, and other missing things.Damien George2015-03-25
| | | | This is intended to improve coverage of the test suite.
* tests: Add tests for things that are not already tested.Damien George2015-03-12
| | | | The aim here is to improve coverage of the code.
* py: Parse big-int/float/imag constants directly in parser.Damien George2015-02-08
| | | | | | | | | Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
* tests: Split out those tests requiring float and import.Damien George2014-04-17
Tests in basics (which should probably be renamed to core) should not rely on float, or import any non-built-in files. This way these tests can be run when those features are not available. All test in basics now pass on the pyboard using stmhal port, except for string-repr which has some issues with character hex printing.