summaryrefslogtreecommitdiffstatshomepage
path: root/tests
Commit message (Collapse)AuthorAge
* modstruct: Implement count specifier for strings (e.g. "100s").Paul Sokolovsky2014-05-12
| | | | Infra for counts of other types is there, need last mile to be implemented.
* objstr: Slice indexing: support bytes properly.Paul Sokolovsky2014-05-11
|
* objstr: Make .split() support bytes.Paul Sokolovsky2014-05-11
|
* objstr: Make .join() support bytes.Paul Sokolovsky2014-05-11
|
* py: Add basic implementation of hasattr() function.Paul Sokolovsky2014-05-11
|
* py: frozenset() creates an empty frozenset.Damien George2014-05-11
|
* Merge pull request #603 from stinos/windows-tests-newlineDamien George2014-05-11
|\ | | | | tests: Fix handling of newlines from expected output files on windows
| * tests: Fix handling of newlines from expected output filesstijn2014-05-11
| |
* | py: Give up and make mp_obj_str_get_data() deal with bytes too.Paul Sokolovsky2014-05-11
|/ | | | | | This is not fully correct re: error handling, because we should check that that types are used consistently (only str's or only bytes), but magically makes lot of functions support bytes.
* objstr: Make *strip() accept bytes.Paul Sokolovsky2014-05-11
|
* tests: Really fix import.Paul Sokolovsky2014-05-11
|
* tests: Fix import.Paul Sokolovsky2014-05-11
|
* objtuple: Go out of the way to support comparison of subclasses.Paul Sokolovsky2014-05-11
| | | | | | | | | | | Two things are handled here: allow to compare native subtypes of tuple, e.g. namedtuple (TODO: should compare type too, currently compared duck-typedly by content). Secondly, allow user sunclasses of tuples (and its subtypes) be compared either. "Magic" I did previously in objtype.c covers only one argument (lhs is many), so we're in trouble when lhs is native type - there's no other option besides handling rhs in special manner. Fortunately, this patch outlines approach with fast path for native types.
* py: Don't try to "bind" types store as attributes of objects.Paul Sokolovsky2014-05-11
| | | | | | | | This was hit when trying to make urlparse.py from stdlib run. Took quite some time to debug. TODO: Reconsile bound method creation process better, maybe callable is to generic type to bind at all?
* objstr: Make .[r]partition() work with bytes.Paul Sokolovsky2014-05-11
|
* objlist: Support list slice deletion.Paul Sokolovsky2014-05-10
|
* objlist: Implement non-growing slice assignment.Paul Sokolovsky2014-05-10
| | | | Slice value to assign can be only a list so far too.
* objtype: Implement ->getiter() method for instances.Paul Sokolovsky2014-05-10
| | | | Includes support for native bases.
* objnamedtuple: Support iteration.Paul Sokolovsky2014-05-10
|
* objstr: Implement .lower() and .upper().Paul Sokolovsky2014-05-10
|
* objset: Add frozenset tests, skippable if frozenset not available.Paul Sokolovsky2014-05-10
|
* run-tests: Add support for skipping tests.Paul Sokolovsky2014-05-10
| | | | MicrpPython test should print single "SKIP" line for test to be skipped.
* objtype: Don't treat inheritance from "object" as from native type.Paul Sokolovsky2014-05-10
| | | | | | | | | | | "object" type in MicroPython currently doesn't implement any methods, and hopefully, we'll try to stay like that for as long as possible. Even if we have to add something eventually, look up from there might be handled in adhoc manner, as last resort (that's not compliant with Python3 MRO, but we're already non-compliant). Hence: 1) no need to spend type trying to lookup anything in object; 2) no need to allocate subobject when explicitly inheriting from object; 3) and having multiple bases inheriting from object is not a case of incompatible multiple inheritance.
* stmhal: Fix setting of RTC: was BCD now BIN encoded.Damien George2014-05-10
| | | | Addresses issue #592.
* py: Fix base "detection" for int('0<hexdigit>', 16).Paul Sokolovsky2014-05-10
|
* bytes: Implement comparison and other binary operations.Paul Sokolovsky2014-05-10
| | | | Should support everything supported by strings.
* py, compiler: Add basic support for A=const(123).Damien George2014-05-08
| | | | | | | | | | | You can now do: X = const(123) Y = const(456 + X) and the compiler will replace X and Y with their values. See discussion in issue #266 and issue #573.
* py: Fix stack access in thumb native emitter.Damien George2014-05-07
|
* tests/bench: Add testcase for positional/kwargs to enumerate().Paul Sokolovsky2014-05-07
| | | | | Inspired by discussion in #577. So, in this case of builtin function, passing args by keyword has less than 1% overhead.
* tests/bench: Add tests for various ways to pass function args.Paul Sokolovsky2014-05-07
| | | | | Passing 3 args with keywords is for example 50% slower than via positional args.
* tests/bench: Add variation on loop_count/while_down_ne test.Paul Sokolovsky2014-05-07
|
* tests/bench: Add testcases for lookup in 5-el instance and namedtuple.Paul Sokolovsky2014-05-07
| | | | | | | | | | | ... and we have not that bad mapping type after all - lookup time is ~ the same as in one-attr instance. My namedtuple implementation on the other hand degrades awfully. So, need to rework it. First observation is that named tuple fields are accessed as attributes, so all names are interned at the program start. Then, really should store field array as qstr[], and do quick 32/64 bit scan thru it.
* tests/bench: Time namedtuple field access.Paul Sokolovsky2014-05-07
| | | | That's higher than instance field access - behold the power of hashing.
* tests: Add a test for native code on pyboard.Damien George2014-05-07
|
* tests: Add inline assembler test for pyboard.Damien George2014-05-07
|
* py: Add keyword arg support to enumerate constructor.Damien George2014-05-06
| | | | | | | | Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
* tests/bench/var: Add tests for class/instance var access.Paul Sokolovsky2014-05-05
| | | | | Also compared with method abstraction for accessing instance vars - it's more than 3 times slower than accessing var directly.
* tests: Add framework for comparative benchmarking.Paul Sokolovsky2014-05-05
| | | | | | | | | | Motivation is optimizing handling of various constructs as well as understanding which constructs are more efficient in MicroPython. More info: http://forum.micropython.org/viewtopic.php?f=3&t=77 Results are wildly unexpected. For example, "optimization" of range iteration into while loop makes it twice as slow. Generally, the more bytecodes, the slower the code.
* tests, pyb: Add 'import pyb' when needed.Damien George2014-05-04
|
* py, stream: Implement readlines for a stream.Damien George2014-05-03
|
* tests: Add a suite of tests specifically for the pyboard.Damien George2014-05-03
| | | | | | | | | | | In tests/pyb is now a suite of tests that tests the pyb module on the pyboard. They include expected output files because we can't run CPython on the pyboard to compare against. run-tests script has now been updated to allow pyboard tests to be run. Just pass the option --pyboard. This runs all basic, float and pyb tests. Note that float/math-fun.py currently fails because not all math functions are implemented in stmhal/.
* tests: Add testcases for catching user Exception subclasses.Paul Sokolovsky2014-05-02
|
* objtype: .print() Exception instances in adhoc way.Paul Sokolovsky2014-05-02
| | | | This is ugly, just as expected.
* Fix the builtin min() and max() functions (and add tests).Andrew Scheller2014-05-01
| | | | Fixes #539
* tests: Add test for calling inherited native method on subclass.Paul Sokolovsky2014-04-30
|
* tests: Add test for accessing attribute of inherited native type.Paul Sokolovsky2014-04-29
|
* tests: Add basic tests for subclassing native types and using special methods.Paul Sokolovsky2014-04-29
| | | | Even of these, some features do not yet work as expected.
* py: Fix bug in map lookup of interned string vs non-interned.Damien George2014-04-28
| | | | | | | Had choice of either interning or forcing full equality comparison, and chose latter. See comments in mp_map_lookup. Addresses issue #523.
* py: Implement keyword-only args.Damien George2014-04-27
| | | | | | | Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
* modio: Implement io.StringIO class.Paul Sokolovsky2014-04-26
|