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 py/profile: Remove the requirement to disable MICROPY_COMP_CONST. 2023-08-30 10:58:04 +10:00
cexample_class.py examples/usercmodule/cexample: Add more advanced native class. 2024-07-25 11:57:13 +10:00
cexample_class.py.exp examples/usercmodule/cexample: Add more advanced native class. 2024-07-25 11:57:13 +10:00
cexample_module.py examples/usercmodule/cexample: Add more advanced native class. 2024-07-25 11:57:13 +10:00
cexample_module.py.exp tests/misc/cexample_module: Test class presence. 2022-11-25 08:13:15 +01:00
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 tests: Format all Python code with black, except tests in basics subdir. 2020-03-30 13:21:58 +11:00
non_compliant.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
non_compliant.py.exp py/objtype: Optimise instance get/set/del by skipping special accessors. 2018-06-08 12:12:08 +10:00
non_compliant_lexer.py tests: Format all Python code with black, except tests in basics subdir. 2020-03-30 13:21:58 +11:00
non_compliant_lexer.py.exp
print_exception.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
rge_sm.py all: Update Python formatting to ruff-format. 2023-11-03 13:30:41 +11:00
sys_atexit.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
sys_atexit.py.exp tests/misc/sys_atexit: Add test for new sys.atexit feature. 2019-08-15 17:31:04 +10:00
sys_exc_info.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
sys_settrace_features.py py/profile: Remove the requirement to disable MICROPY_COMP_CONST. 2023-08-30 10:58:04 +10:00
sys_settrace_generator.py top: Update Python formatting to black "2023 stable style". 2023-02-02 12:51:03 +11:00
sys_settrace_generator.py.exp top: Update Python formatting to black "2023 stable style". 2023-02-02 12:51:03 +11:00
sys_settrace_loop.py tests/misc/sys_settrace: Make test output independent of invoked path. 2020-12-18 13:56:45 +11:00
sys_settrace_loop.py.exp tests/misc/sys_settrace: Make test output independent of invoked path. 2020-12-18 13:56:45 +11:00