summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLucian Copeland <hierophect@gmail.com>2020-09-09 13:24:30 -0400
committerLucian Copeland <hierophect@gmail.com>2020-09-09 13:24:30 -0400
commitbe199983c155118717b56a405e546b3bb79c49ea (patch)
treef8d8fa2aae3b451df7463e6d7b5f1711bf43a57d /tests
parent4733a672265f97a83353d005160f8e24ed8755b8 (diff)
parent66cf6c46c005cf67181e2ba58ecadc619344687d (diff)
Merge remote-tracking branch 'upstream/main' into esp32-displayio-fix
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/bit_length.py4
-rw-r--r--tests/basics/builtin_help.py.exp4
-rw-r--r--tests/cmdline/repl_autocomplete.py.exp2
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.
>>> x.__class__
<class 'int'>