aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-02-10Merge pull request #267 from pfalcon/func-ret-annDamien George
Clean up handling of function return type annotation.
2014-02-10Factor out mp_seq_count_obj() and implement tuple.count().Paul Sokolovsky
2014-02-10Implement tuple.index().Paul Sokolovsky
2014-02-10Clean up handling of function return type annotation.Paul Sokolovsky
2014-02-08Implement tuple multiplication.Paul Sokolovsky
2014-02-08Implement tuple addition.Paul Sokolovsky
2014-02-08Implement tuple comparison.Paul Sokolovsky
2014-02-08io.File, socket types: Add fileno() method.Paul Sokolovsky
Implementation is duplicated, but tolerate this for now, because there's no clear idea how to de-dup it.
2014-02-06Add more finally + break/continue testcases.Paul Sokolovsky
2014-02-06Add additional testcase for finally/return.Paul Sokolovsky
2014-02-05py: Add built-in super.Damien George
2014-02-04Fix unstable case in builtin_id.py test.Paul Sokolovsky
2014-02-02Merge branch 'xbe-master'Damien George
2014-02-02Change id to return signed integer.Damien George
2014-02-02Implement str/bytes rich comparisons.Paul Sokolovsky
2014-02-01Implement and add tests for the id() builtin function.xbe
2014-02-02Implement slicing for tuples.Paul Sokolovsky
2014-02-02Implement slicing for lists.Paul Sokolovsky
2014-02-02Add testcase for sequence unpacking.Paul Sokolovsky
2014-02-01py: Implement break/continue from an exception with finally.Damien George
Still todo: break/continue from within the finally block itself.
2014-02-01Merge branch 'fun-defargs' of github.com:pfalcon/micropython into ↵Damien George
pfalcon-fun-defargs
2014-02-01Implement default function arguments (for Python functions).Paul Sokolovsky
TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
2014-02-01Add exception stack unwind support for RETURN_VALUE.Paul Sokolovsky
This properly implements return from try/finally block(s). TODO: Consider if we need to do any value stack unwinding for RETURN_VALUE case. Intuitively, this is "success" return, so value stack should be in good shape, and unwinding shouldn't be required.
2014-01-31Merge pull request #246 from pfalcon/exc_stack_entryDamien George
vm: Introduce structure for exception stack entry, record entry type.
2014-01-31Merge branch 'master' of github.com:xbe/micropython into xbe-masterDamien George
2014-01-31Add basic try-finally testcase.Paul Sokolovsky
It's mildly suprising these work without further changes to exception handling code (the only change required was to handle SETUP_FINALLY).
2014-01-31Typo fixes in comments.Paul Sokolovsky
2014-01-31Add testcase with exception handler spread across functions.Paul Sokolovsky
2014-01-30Implement str.replace and add tests for it.xbe
2014-01-30Add tests for str.stripxbe
2014-01-30vm: Add basic implementation of END_FINALLY opcode.Paul Sokolovsky
Allows to have nested try blocks with except filters. TODO: Don't add END_FINALLY's exception re-raise points to traceback.
2014-01-30py: Improve __bool__ and __len__ dispatch; add slots for them.Damien George
2014-01-30Implement __bool__ and __len__ via unary_op virtual method for all types.Paul Sokolovsky
__bool__() and __len__() are just the same as __neg__() or __invert__(), and require efficient dispatching implementation (not requiring search/lookup). type->unary_op() is just the right choice for this short of adding standalone virtual method(s) to already big mp_obj_type_t structure.
2014-01-29run-tests can handle segfault.Damien George
2014-01-29Merge branch 'master' of github.com:msiemens/micropython into msiemens-masterDamien George
2014-01-28Rename array test to array1 so it doesn't clash with array module.Damien George
On my machine, 'import array' in CPython tries to load the array test.
2014-01-28Added Windows port (see #233)Markus Siemens
2014-01-28bytearray: Print objects properly.Paul Sokolovsky
2014-01-28Add basic array.array test.Paul Sokolovsky
2014-01-27Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-01-27py: Add unary op not for NoneType, bool, tuple, list, dict; fix for int.Damien George
2014-01-27long int: Implement more operations.Paul Sokolovsky
2014-01-27gen.send(): Throw StopIteration. Also, explicitly shutdown finished gen.Paul Sokolovsky
Otherwise, some generator statements still may be spuriously executed on subsequent calls to next()/send().
2014-01-26Implement send() method for generators.Paul Sokolovsky
2014-01-25py: Implement iterator support for object that has __getitem__.Damien George
Addresses Issue #203.
2014-01-24Add basic implementation of bytes type, piggybacking on str.Paul Sokolovsky
This reuses as much str implementation as possible, from this we can make them more separate as needed.
2014-01-23mp_obj_is_callable(): Only object types can be callable.Paul Sokolovsky
Fixes segfault on callable("string").
2014-01-23Implement simplest case of str.startswith().Paul Sokolovsky
2014-01-22Implement octal and hex escapes in strings.Paul Sokolovsky
2014-01-21py: Implement break and continue byte codes, and add tests.Damien George
Also fixes a bug in the for-in-range optimiser. I hope to remove break and continue byte codes in the future and just use jump (if possible).