summaryrefslogtreecommitdiff
path: root/tests/basics/sys1.py
AgeCommit message (Collapse)Author
2025-07-22py/modsys: Add sys.implementation._thread attribute.Damien George
This is useful to distinguish between GIL and non-GIL builds. Signed-off-by: Damien George <damien@micropython.org>
2025-03-05py/modsys: Add sys.implementation._build entry.Damien George
For a given MicroPython firmware/executable it can be sometimes important to know how it was built, which variant/board configuration it came from. This commit adds a new field `sys.implementation._build` that can help identify the configuration that MicroPython was built with. For now it's either: * <VARIANT> for unix, webassembly and windows ports * <BOARD>-<VARIANT> for microcontroller ports (the variant is optional) In the future additional elements may be added to this string, separated by a hyphen. Resolves issue #16498. Signed-off-by: Damien George <damien@micropython.org>
2023-12-15py/modsys: Implement optional sys.intern.stijn
Signed-off-by: stijn <stijn@ignitron.net>
2023-06-08tests: Replace umodule with module everywhere.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-05-17tests: Fix tests to use sys.implementation._mpy.Damien George
The field was renamed to _mpy in 59c5d4161120db28bc6cbc7653f2e7fdb4a87370 Signed-off-by: Damien George <damien@micropython.org>
2020-09-04all: Rename "sys" module to "usys".stijn
This is consistent with the other 'micro' modules and allows implementing additional features in Python via e.g. micropython-lib's sys. Note this is a breaking change (not backwards compatible) for ports which do not enable weak links, as "import sys" must now be replaced with "import usys".
2019-11-04py/modsys: Report .mpy version in sys.implementation.Damien George
This commit adds a sys.implementation.mpy entry when the system supports importing .mpy files. This entry is a 16-bit integer which encodes two bytes of information from the header of .mpy files that are supported by the system being run: the second and third bytes, .mpy version, and flags and native architecture. This allows determining the supported .mpy file dynamically by code, and also for the user to find it out by inspecting this value. It's further possible to dynamically detect if the system supports importing .mpy files by `hasattr(sys.implementation, 'mpy')`.
2019-10-29tests/basics: Split sys.exit test to separate file so it can be skipped.Damien George
2019-05-03tests/basics/sys1.py: Add test for calling sys.exit() without any args.Damien George
2017-06-10tests/basics: Convert "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-02-15tests/basic/: Make various tests skippable.Paul Sokolovsky
To run the testsuite on small ports.
2015-10-02tests: Allow tests to pass against CPython 3.5.Damien George
All breaking changes going from 3.4 to 3.5 are contained in basics/python34.py.
2015-04-22tests: Add tests for attrtuple, and for more corner cases.Damien George
2015-04-04tests: Add missing tests for builtins, and many other things.Damien George