aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-01-14py: Reluctantly add an extra pass to bytecode compiler.Damien George
Bytecode also needs a pass to compute the stack size. This is because the state size of the bytecode function is encoded as a variable uint, so we must know the value of this uint before we encode it (otherwise the size of the generated code changes from one pass to the next). Having an entire pass for this seems wasteful (in time). Alternative is to allocate fixed space for the state size (would need 3-4 bytes to be general, when 1 byte is usually sufficient) which uses a bit of extra RAM per bytecode function, and makes the code less elegant in places where this uint is encoded/decoded. So, for now, opt for an extra pass.
2015-01-13py: Never intern data of large string/bytes object; add relevant tests.Damien George
Previously to this patch all constant string/bytes objects were interned by the compiler, and this lead to crashes when the qstr was too long (noticeable now that qstr length storage defaults to 1 byte). With this patch, long string/bytes objects are never interned, and are referenced directly as constant objects within generated code using load_const_obj.
2015-01-11py: Implement fallback for equality check for all types.Damien George
Return "not equal" for objects that don't implement equality check. This is as per Python specs.
2015-01-10tests: Make ffi_callback.py be able to run on uclibc and macosx.Paul Sokolovsky
Similar to ffi_float.py.
2015-01-08tests: Add test for when instance member overrides class member.Damien George
2015-01-08tests: Separate out test cases that rely on float support to float/ dir.Damien George
2015-01-07py: Temporary fix for conversion of float to int when fits in small int.Damien George
Addresses issue #1044 (see also #1040). Could do with a better fix.
2015-01-04objarray: Make sure that longint works as bytearray size.Paul Sokolovsky
2015-01-04objstr: Implement kwargs support for str.format().Paul Sokolovsky
2015-01-02py: Raise exception if trying to convert inf/nan to int.Damien George
2015-01-02py: Fix float to int conversion for large exponents.David Steinberg
2015-01-01py: Allow keyword arguments for namedtuplestijn
2015-01-01py: Use sequence of strings for named tuple initializationstijn
- remove single string initialization style - take list of strings instead - store list in the type for fast lookup
2014-12-31py: Fix rshift and not of zero/one edge cases in mpz.Damien George
Addresses issue #1027.
2014-12-31tests: Disable float/float2int.py on pyboard (needs double prec).Damien George
2014-12-31objstr: Fix %d-formatting of floats.Paul Sokolovsky
2014-12-30py: Partially fix float to int conversion.Paul Sokolovsky
This fixes conversion when float type has more mantissa bits than small int, and float value has small exponent. This is for example the case of 32-bit platform using doubles, and converting value of time.time(). Conversion of floats with larg exponnet is still not handled correctly.
2014-12-24py: Make bytes objs work with more str methods; add tests.Damien George
2014-12-24tests: Add run-tests-exp.py, simple MicroPython-based test runner.Paul Sokolovsky
This script is rewrite of run-tests-exp.sh, and tries to achieve self-hosted testsuite running in environments where neither CPython nor unix shell is available. As run-tests-exp.sh, it requires complete set of .exp files pre-generated with ./run-test --write-exp.
2014-12-20run-tests: Allow to run testuite against Windows build on Linux (using Wine).Paul Sokolovsky
Just adjust line-endings of micropython.exe output, the rest should be handled by Wine (automagically on properly configured distro). To run: MICROPY_MICROPYTHON=../windows/micropython.exe ./run-tests
2014-12-20windows: Correctly interpret skipped tests, enable uhashlib and ubinasciistijn
2014-12-18lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal.Damien George
acoshf, asinhf, atanhf were added from musl. mathsincos.c was split up into its original, separate files (from newlibe-nano-2). tan was added. All of the important missing float functions are now implemented, and pyboard now passes tests/float/math_fun.py (finally!).
2014-12-18tests: Get misc/print_exception and pyb/spi working on pyboard.Damien George
2014-12-18tests: sha256: skip test if uhashlib module is not available.Paul Sokolovsky
2014-12-15tests: Add testcase for ffi callbacks.Paul Sokolovsky
2014-12-14asmarm: Fix bug with encoding small negative ints using MVN instruction.Paul Sokolovsky
2014-12-13run-tests: Skip native/viper tests based on prefix.Paul Sokolovsky
Otherwise, new tests are forgotten to be added to explicit lists. Issue found running on Debian/ARM.
2014-12-12py: Fix optimised for-loop compiler so it follows proper semantics.Damien George
You can now assign to the range end variable and the for-loop still works correctly. This fully addresses issue #565. Also fixed a bug with the stack not being fully popped when breaking out of an optimised for-loop (and it's actually impossible to write a test for this case!).
2014-12-12run-tests: Reset MICROPYPATH, to make sure tests use only builtin modules.Paul Sokolovsky
2014-12-12run-tests: PEP8 fix.Paul Sokolovsky
2014-12-12tests: Activate recursive_data.py test, now that io.StringIO is available.Paul Sokolovsky
2014-12-11tests: Add test for semantics of for-loop that optimisation can break.Damien George
2014-12-11tests: Disable print_exception test when using native emitter.Damien George
2014-12-11tests: Fix print_exception test and re-enable it on Travis CI.Damien George
Issue was with uPy: on local machine with micropython-lib installed, io module is available. Not the case on Travis CI, where only _io module is available in uPy.
2014-12-11run-tests: Skip print_exception.py on TravisCI, as it irreproducibly fails.Paul Sokolovsky
TODO: Figure out what's wrong on Travis.
2014-12-10tests: Fix print_exception.py to work on Travis CI.Damien George
2014-12-10tests: Add test for print_exception() function.Paul Sokolovsky
2014-12-09py: Allow builtins to be overridden.Damien George
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
2014-12-05py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.Damien George
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
2014-12-04py: Allow bytes/bytearray/array to be init'd by buffer protocol objects.Damien George
Behaviour of array initialisation is subtly different for bytes, bytearray and array.array when argument has buffer protocol. This patch gets us CPython conformant (except we allow initialisation of array.array by buffer with length not a multiple of typecode).
2014-11-30py: Implement +, += and .extend for bytearray and array objs.Damien George
Addresses issue #994.
2014-11-29tests: Split out float test from builtin_round.py.Damien George
2014-11-26Adding CAN filter managementHenrik Sölver
2014-11-22tests: Add test for hashlib.sha256 .Paul Sokolovsky
2014-11-21py: Add support for float/double arrays in array module.Damien George
Addresses issue #981.
2014-11-19Set PYTHONIOENCODING='utf-8' so that unicode tests can pass on CPython onblmorris
systems where another encoding is set in the locale
2014-11-16py: Make stream seek correctly check for ioctl fn; add seek for textio.Damien George
2014-11-17tests: Add test for file.seek().Paul Sokolovsky
2014-11-15stmhal: Fix HAL error raising; make test for it.Damien George
Addresses issue #968.
2014-11-15tests: Add test for hash of user defined class.Damien George