summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-03-30Merge pull request #399 from pfalcon/gen-defargsDamien George
objgenerator: Handle default args to generator functions.
2014-03-30py: Fix "TypeError: 'iterator' object is not iterable", doh.Paul Sokolovsky
2014-03-30py: Implement support for generalized generator protocol.Paul Sokolovsky
Iterators and ducktype objects can now be arguments of yield from.
2014-03-30py: Implement positional and keyword args via * and **.Damien George
Extends previous implementation with * for function calls to * and ** for both function and method calls.
2014-03-30objgenerator: Handle default args to generator functions.Paul Sokolovsky
Addresses #397.
2014-03-30vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).Paul Sokolovsky
2014-03-30Add "tracing" to try-reraise2.py test. It now fails.Damien George
2014-03-30vm: Save current active exception on opening new try block.Paul Sokolovsky
Required to reraise correct exceptions in except block, regardless if more try blocks with active exceptions happen in the same except block. P.S. This "automagic reraise" appears to be quite wasteful feature of Python - we need to save pending exception just in case it *might* be reraised. Instead, programmer could explcitly capture exception to a variable using "except ... as var", and reraise that. So, consider disabling argless raise support as an optimization.
2014-03-29py: Reraising exception possible only in except block.Paul Sokolovsky
2014-03-29Merge pull request #389 from pfalcon/with-statementDamien George
With statement implementation
2014-03-29Merge pull request #383 from pfalcon/yield-fromDamien George
Implement "yield from"
2014-03-29tests: Remove unimplemented exceptions from testing.Damien George
2014-03-29tests: Add "with" statement testcases.Paul Sokolovsky
2014-03-28tests: Add testcases for yield from.Paul Sokolovsky
2014-03-26Merge pull request #381 from pfalcon/closure-defargsDamien George
py: Support closures with default args.
2014-03-27py: Implement getattr() builtin.Paul Sokolovsky
2014-03-26py: Support closures with default args.Paul Sokolovsky
2014-03-26py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.Damien George
2014-03-26Merge pull request #379 from pfalcon/reraiseDamien George
vm: Implement raise statement w/o args (reraising last exception).
2014-03-26Merge branch 'gen-close-ret-val' of github.com:pfalcon/micropython into ↵Damien George
pfalcon-gen-close-ret-val
2014-03-26vm: Implement raise statement w/o args (reraising last exception).Paul Sokolovsky
2014-03-26objgenerator: Implement return with value and .close() method.Paul Sokolovsky
Return with value gets converted to StopIteration(value). Implementation keeps optimizing against creating of possibly unneeded exception objects, so there're considerable refactoring to implement these features.
2014-03-25Merge pull request #370 from xbe/str-rfindDamien George
py/objstr.c: Implement str.rfind() and add tests for it, refactor find_subbytes().
2014-03-25py: Removed some unnecessary exception objects.Damien George
They still exist in commented-out form in objexcept.c if they are ever needed.
2014-03-25objexcept: Add "args" exception attribute, as well as StopIteration.value.Paul Sokolovsky
2014-03-25rt_load_method(): Add missing qstr_str() when getting type name.Paul Sokolovsky
2014-03-24Implement str.rfind() and add tests for it.xbe
2014-03-23py: Implement support for "except Exception as var" clause.Paul Sokolovsky
For this, needed to implement DELETE_NAME bytecode (because var bound in except clause is automatically deleted at its end). http://docs.python.org/3/reference/compound_stmts.html#except : "When an exception has been assigned using as target, it is cleared at the end of the except clause."
2014-03-23run-tests: Dump output of failing tests to files again.Paul Sokolovsky
This was a long-standing regression from converting script from sh to python.
2014-03-22Merge pull request #359 from rjdowdall/masterDamien George
Fixed some math functions and added more exceptions.
2014-03-22Fixed floor division on mp ints and small ints. Added a floordivide test case.Rachel Dowdall
2014-03-22Fixed modulo operator on ints and mp ints to agree with python. Added ↵Rachel Dowdall
intdivmod.c and tests/basics/modulo.py.
2014-03-22objgenerator: Implement .throw() method to throw exceptions into generator.Paul Sokolovsky
2014-03-22objgenerator: Implement throwing exceptions out of generator.Paul Sokolovsky
2014-03-22objgenerator: Keep exception stack within generator object, like value stack.Paul Sokolovsky
This is required to properly handle exceptions across yields.
2014-03-22Added exception hierarchy except for OSError and UnicodeError (requires ↵Rachel Dowdall
arguments). Comment out the errors that aren't needed if memory becomes an issue.
2014-03-22Fixed broken math functions that return bool and added some more.Rachel Dowdall
2014-03-22py: Make 'bytes' be a proper type, support standard constructor args.Paul Sokolovsky
2014-03-22objint_longlong: Add regression test for improper inplace op implementation.Paul Sokolovsky
2014-03-21Merge pull request #351 from xbe/str-partitionDamien George
Implement str.partition and add tests for it.
2014-03-21Implement str.rpartition and add tests for it.xbe
2014-03-21Implement str.partition and add tests for it.xbe
2014-03-20Rename test so that it doesn't clash with Python math module.Damien George
2014-03-20Added various simple functions to math module.Rachel Dowdall
2014-03-20py: Add mpz modulo operation.Damien George
2014-03-16Implement support for __str__ and __repr__ special methods in classes.Paul Sokolovsky
2014-03-13py: In string.count, handle case of zero-length needle.Damien George
2014-03-13Fix issues in str.count implementation.xbe
See pull request #343.
2014-03-12Implement str.count and add tests for it.xbe
Also modify mp_get_index to accept: 1. Indices that are or evaluate to a boolean. 2. Slice indices. Add tests for these two cases.
2014-03-12Add more tests for multi-precision integers.Damien George