Skip to content
Snippets Groups Projects
Commit 1864f90e authored by Damien George's avatar Damien George
Browse files

tests: Add test for builtin help function.

parent 51c89e4f
No related branches found
No related tags found
No related merge requests found
# test builtin help function
try:
help
except NameError:
print("SKIP")
import sys
sys.exit()
help() # no args
help(help) # help for a function
help(int) # help for a class
help(1) # help for an instance
import micropython
help(micropython) # help for a module
print('done') # so last bit of output is predictable
########
object <function> is of type function
object <class 'int'> is of type type
from_bytes -- <classmethod>
to_bytes -- <function>
object 1 is of type int
from_bytes -- <classmethod>
to_bytes -- <function>
object <module 'micropython'> is of type module
__name__ -- micropython
const -- <function>
opt_level -- <function>
########
done
...@@ -51,7 +51,7 @@ def convert_regex_escapes(line): ...@@ -51,7 +51,7 @@ def convert_regex_escapes(line):
def run_micropython(pyb, args, test_file): def run_micropython(pyb, args, test_file):
special_tests = ('micropython/meminfo.py', 'basics/bytes_compare3.py', 'thread/thread_exc2.py') special_tests = ('micropython/meminfo.py', 'basics/bytes_compare3.py', 'basics/builtin_help.py', 'thread/thread_exc2.py')
is_special = False is_special = False
if pyb is None: if pyb is None:
# run on PC # run on PC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment