aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-04-02py: Fix regress for printing of floats and #if.Damien George
Also change formating modifier in test script (it still passes with original format though).
2014-04-02tests/string-format: Add test for formatting ints with float format.Paul Sokolovsky
Fail currently.
2014-04-02Change test scripts to use python3; bytecode tests use python3.4.Damien George
I upgraded to Python 3.4.0, so needed to make these changes. Hopefully the tests still run with Python 3.3.x (the scripts use python3 so are agnostic as to the subversion). Bytecode tests are tightly coupled to the Python version, and now some fail against Python 3.4.
2014-04-02Add more tests.Damien George
2014-04-02py: Factor out static/class method unwrapping code; add tests.Damien George
2014-04-02Add a test.Damien George
2014-04-02py: Add support for sep and end keywords in print.Damien George
2014-04-01py: Fix math.{ceil,floor,trunc} to return int.Damien George
2014-04-01Turn off full tests in string-format.pyDave Hylands
Add some basic coverage tests
2014-04-01tests: Add test for implicit float to int conversion (not allowed!)Paul Sokolovsky
2014-04-01Enhance str.format supportDave Hylands
This adds support for almost everything (the comma isn't currently supported). The "unspecified" type with floats also doesn't behave exactly like python. Tested under unix with float and double Spot tested on stmhal
2014-03-31py: Implement __getattr__.Damien George
It's not completely satisfactory, because a failed call to __getattr__ should not raise an exception. __setattr__ could be implemented, but it would slow down all stores to a user created object. Need to implement some caching system.
2014-03-31objstr: Very basic implementation of % string formatting operator.Paul Sokolovsky
2014-03-31Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-31py: Fix bug in optimised for .. range.Damien George
Don't store final, failing value to the loop variable. This fix also makes for .. range a bit more efficient, as it uses less store/load pairs for the loop variable.
2014-03-31tests: Add testcase for multiple inheritance.Paul Sokolovsky
2014-03-31py: Properly implement divide-by-zero handling.Paul Sokolovsky
"1/0" is sacred idiom, the shortest way to break program execution (sys.exit() is too long).
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