diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-09-08 13:10:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-08 13:10:57 -0700 |
| commit | bbd802940ee707fbf8647e0f1017dfb713a94c14 (patch) | |
| tree | a7ae784edbb390d49e88b31cac36c9b3d645c724 /tests | |
| parent | 540e6d428564f67ad821aeb1da29e11d712a792f (diff) | |
| parent | 7d58cdb12c001f5a4a0fdf2fc0d1e8c1d4029045 (diff) | |
Merge pull request #3377 from jepler/support-udecimal
core: Enable some features neede for a port of python3's decimal module
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/bit_length.py | 4 | ||||
| -rw-r--r-- | tests/basics/builtin_help.py.exp | 4 | ||||
| -rw-r--r-- | tests/cmdline/repl_autocomplete.py.exp | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/tests/basics/bit_length.py b/tests/basics/bit_length.py new file mode 100644 index 000000000..5eb33f604 --- /dev/null +++ b/tests/basics/bit_length.py @@ -0,0 +1,4 @@ +for i in range(129): + j = (1 << i) + print(i, (j-1).bit_length(), (j).bit_length(), (j+1).bit_length()) + print(i, (-j-1).bit_length(), (-j).bit_length(), (-j+1).bit_length()) diff --git a/tests/basics/builtin_help.py.exp b/tests/basics/builtin_help.py.exp index ed8a7d74b..89350a6c7 100644 --- a/tests/basics/builtin_help.py.exp +++ b/tests/basics/builtin_help.py.exp @@ -1,14 +1,14 @@ ######## object <function> is of type function object <class 'int'> is of type type + bit_length -- <function> from_bytes -- <classmethod> to_bytes -- <function> object 1 is of type int + bit_length -- <function> from_bytes -- <classmethod> to_bytes -- <function> object <module 'micropython'> is of type module __name__ -- micropython - const -- <function> - opt_level -- <function> ######## done diff --git a/tests/cmdline/repl_autocomplete.py.exp b/tests/cmdline/repl_autocomplete.py.exp index 7d160e7bf..0dabc9014 100644 --- a/tests/cmdline/repl_autocomplete.py.exp +++ b/tests/cmdline/repl_autocomplete.py.exp @@ -12,7 +12,7 @@ Use \.\+ 'abc' >>> x = 5 >>> x. -from_bytes to_bytes +bit_length from_bytes to_bytes >>> x.[K[K >>> x.__class__ <class 'int'> |
