summaryrefslogtreecommitdiff
path: root/tests/unix/extra_coverage.py
AgeCommit message (Collapse)Author
2022-11-23tests/misc: Add test for cexample module.Laurens Valk
This also moves the existing test for cexample.add_ints originally done in extra_coverage. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2022-09-19unix/variants/coverage: Add test for manifest freeze_mpy().Jim Mussared
This uses the frozentest.mpy that is also used by ports/minimal. Also fixes two bugs that these new tests picked up: - File extension matching in manifestfile.py. - Handling of freeze_mpy results in makemanifest. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-02-28tests/unix: Add coverage test for freezing various objects.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-12-17py/modio: Remove io.resource_stream function.Jim Mussared
This feature is not enabled on any port, it's not in CPython's io module, and functionality is better suited to the micropython-lib implementation of pkg_resources.
2020-10-29examples: Add example code for user C modules, both C and C++.stijn
Add working example code to provide a starting point for users with files that they can just copy, and include the modules in the coverage test to verify the complete user C module build functionality. The cexample module uses the code originally found in cmodules.rst, which has been updated to reflect this and partially rewritten with more complete information.
2020-10-29esp32,unix: Support building C++ code.stijn
Support building .cpp files and linking them into the micropython executable in a way similar to how it is done for .c files. The main incentive here is to enable user C modules to use C++ files (which are put in SRC_MOD_CXX by py.mk) since the core itself does not utilize C++. However, to verify build functionality a unix overage test is added. The esp32 port already has CXXFLAGS so just add the user modules' flags to it. For the unix port use a copy of the CFLAGS but strip the ones which are not usable for C++.
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2019-09-26py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions.Josh Lloyd
Fixes #5140.
2019-07-31py/builtinimport: Populate __file__ when importing frozen or mpy files.Paul m. p. P
Note that bytecode already includes the source filename as a qstr so there is no additional memory used by the interning operation here.
2018-06-18tests/unix/extra_coverage: Don't test stream objs with NULL write fun.Damien George
This behaviour of a NULL write C method on a stream that uses the write adaptor objects is no longer supported. It was only ever used by the coverage build for testing the fail path of mp_get_stream_raise().
2018-03-03tests/unix: Add coverage test for uio.resource_stream from frozen str.Damien George
2017-06-10tests: Convert remaining "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-01-17tests/io: Improve test coverage of io.BufferedWriter.Rami Ali
2017-01-16tests: Improve frozen import test coverage.Rami Ali
2017-01-16tests: Improve stream.c test coverage.Rami Ali
2017-01-08tests/unix/extra_coverage: Add tests for importing frozen packages.Damien George
2017-01-05tests/unix/extra_coverage: Add basic tests to import frozen str and mpy.Damien George
2016-09-02tests/unix/extra_coverage: Add test for str/bytes with invalid hash.Damien George
2015-05-08unix: Make extra-coverage function callable from Python scripts.Damien George
This allows the output of the extra-coverage tests to be checked using the normal run-tests script.