micropython/tests/misc
Laurens Valk 9ca668f881 py/objtype: Avoid crash on calling members of uninitialized native type.
When subclassing a native type, calling native members in `__init__` before
`super().__init__()` has been called could cause a crash.  In this
situation, `self` in `mp_convert_member_lookup` is the
`native_base_init_wrapper_obj`.  The check added in this commit ensures
that an `AttributeError` is raised before this happens, which is consistent
with other failed lookups.

Also fix a typo in a related comment.

Signed-off-by: Laurens Valk <laurens@pybricks.com>
2024-07-25 12:01:43 +10:00
..
sys_settrace_subdir
cexample_class.py
cexample_class.py.exp
cexample_module.py
cexample_module.py.exp
cexample_subclass.py py/objtype: Avoid crash on calling members of uninitialized native type. 2024-07-25 12:01:43 +10:00
cexample_subclass.py.exp py/objtype: Avoid crash on calling members of uninitialized native type. 2024-07-25 12:01:43 +10:00
features.py
non_compliant_lexer.py
non_compliant_lexer.py.exp
non_compliant.py
non_compliant.py.exp
print_exception.py
rge_sm.py
sys_atexit.py
sys_atexit.py.exp
sys_exc_info.py
sys_settrace_features.py
sys_settrace_generator.py
sys_settrace_generator.py.exp
sys_settrace_loop.py
sys_settrace_loop.py.exp