Files
micropython/tests/basics/builtin_help.py
Anson Mansfield c25667f6a9 tests/basics/builtin_help.py: Test correct handling of deleted entries.
This test reproduces the bug that gave rise to the esp32 segfaults in
issues #18061 and #18481 on all platforms.

Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
2025-12-07 18:22:56 +11:00

24 lines
412 B
Python

# test builtin help function
try:
help
except NameError:
print("SKIP")
raise SystemExit
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
help('modules') # list available modules
class A:
x = 1
y = 2
del x
help(A)
print('done') # so last bit of output is predictable