circuitpython/tests/misc
Glenn Moloney eb45d97898 py/objstr: Support tuples and start/end args in startswith and endswith.
This change allows tuples to be passed as the prefix/suffix argument to the
`str.startswith()` and `str.endswith()` methods.  The methods will return
`True` if the string starts/ends with any of the prefixes/suffixes in the
tuple.

Also adds full support for the `start` and `end` arguments to both methods
for compatibility with CPython.

Tests have been updated for the new behaviour.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2025-03-02 22:15:31 +11: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 py/objstr: Support tuples and start/end args in startswith and endswith. 2025-03-02 22:15:31 +11:00
non_compliant.py.exp py/objstr: Support tuples and start/end args in startswith and endswith. 2025-03-02 22:15:31 +11: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 py/lexer: Raise NotImplError for unicode name escape, instead of assert. 2015-09-07 17:08:49 +01:00
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 tests/misc/sys_settrace_features.py: Add note about CPython 3.12 issue. 2024-11-28 23:11:36 +11: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