summaryrefslogtreecommitdiff
path: root/tests/unix
AgeCommit message (Collapse)Author
2018-02-08tests/unix: Add coverage test for calling mp_obj_new_bytearray.Damien George
2017-12-19tests/unix: Add test for printf with %lx format.Damien George
2017-10-27py/objtype: Define all special methods if requested.Paul Sokolovsky
If MICROPY_PY_ALL_SPECIAL_METHODS is defined, actually define all special methods (still subject to gating by e.g. MICROPY_PY_REVERSE_SPECIAL_METHODS). This adds quite a number of qstr's, so should be used sparingly.
2017-09-21py/vstr: Raise a RuntimeError if fixed vstr buffer overflows.Damien George
Current users of fixed vstr buffers (building file paths) assume that there is no overflow and do not check for overflow after building the vstr. This has the potential to lead to NULL pointer dereferences (when vstr_null_terminated_str returns NULL because it can't allocate RAM for the terminating byte) and stat'ing and loading invalid path names (due to the path being truncated). The safest and simplest thing to do in these cases is just raise an exception if a write goes beyond the end of a fixed vstr buffer, which is what this patch does. It also simplifies the vstr code.
2017-09-18py/modbuiltins: Implement abs() by dispatching to MP_UNARY_OP_ABS.Paul Sokolovsky
This allows user classes to implement __abs__ special method, and saves code size (104 bytes for x86_64), even though during refactor, an issue was fixed and few optimizations were made: * abs() of minimum (negative) small int value is calculated properly. * objint_longlong and objint_mpz avoid allocating new object is the argument is already non-negative.
2017-08-11py/modsys: Initial implementation of sys.getsizeof().Paul Sokolovsky
Implemented as a new MP_UNARY_OP. This patch adds support lists, dicts and instances.
2017-06-30tests/unix/extra_coverage: Add test for mp_vprintf with bad fmt spec.Damien George
2017-06-10tests: Convert remaining "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-03-20unix/coverage: Enable scheduler and add tests for it.Damien George
2017-03-14tests: Improve binary.c test coverage.Rami Ali
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
2017-01-05tests/unix: Improve formatfloat.c test coverage using C.Rami Ali
2017-01-05tests: Improve warning.c test coverage.Rami Ali
2016-12-29tests/unix: Improve runtime_utils.c test coverage.Rami Ali
2016-09-02tests/unix/extra_coverage: Add test for str/bytes with invalid hash.Damien George
2016-09-01py/mpprint: Fail an assertion with unsupported format specifiers.Delio Brignoli
Arguments of an unknown type cannot be skipped and continuing to parse a format string after encountering an unknown format specifier leads to undefined behaviour. This patch helps to find use of unsupported formats.
2016-02-01py/mpprint: Fix sign extension when printf'ing %u, %x and %X.Damien George
2015-12-05tests/extra_coverage: Update for sys.modules addition.Paul Sokolovsky
2015-10-01tests: Add further tests for mpz code.Damien George
2015-09-03tests: Add tests to improve coverage of objstr.c.Damien George
2015-08-29tests/ffi_float: Split tgammaf() testcase to a separate test.Paul Sokolovsky
Some libc's may implement tgammaf as a header macro using tgamma(), so don't assume it'll be in the library.
2015-08-25tests: For unix ffi float test, add libm.so.6 to library search list.Damien George
Latest Arch Linux doesn't have libm.so as a proper shared object and so we need to load libm.so.6.
2015-05-28tests: Add special tests to test mp_printf function to improve coverage.Damien George
2015-05-12unix: Add some extra coverage tests for vstr and attrtuple.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.
2015-04-28unix/modffi: Support passing float/double args.Damien George
2015-01-10tests: Make ffi_callback.py be able to run on uclibc and macosx.Paul Sokolovsky
Similar to ffi_float.py.
2014-12-15tests: Add testcase for ffi callbacks.Paul Sokolovsky
2014-10-06tests: Skip ffi_float.py if module ffi is not available.Paul Sokolovsky
2014-09-25Change allows tests/unix/ffi_float.py to pass on OSXblmorris
2014-09-06unix: Don't use -Wno-error=cpp or #warning; fix strict alias warning.Damien George
For the sake of older versions of gcc (and other compilers), don't use the #warning CPP directive, nor the -Wno-error=cpp option. Also, fix a strict alias warning in modffi.c for older compilers, and add a test for ffi module. Addresses issue #847.