summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-06-03py: Implement full behaviour of dict.update(), and dict().Damien George
Add keyword args to dict.update(), and ability to take a dictionary as argument. dict() class constructor can now use dict.update() directly. This patch loses fast path for dict(other_dict), but is that really needed? Any anyway, this idiom will now re-hash the dictionary, so is arguably more memory efficient. Addresses issue #647.
2014-05-31tests: Add feature test for when heap allocation is disabled.Damien George
2014-05-31tests: Change --test_dirs to --test-dirs.Damien George
2014-05-31Merge pull request #632 from stinos/tests-dir-argumentDamien George
tests: Add argument to allow specifying which directories to test
2014-05-31py: Fix stack underflow with optimised for loop.Damien George
2014-05-31tests: Add another test for break-from-for-loop.Damien George
2014-05-31add methods isspace(), isalpha(), isdigit(), isupper() and islower() to strKim Bauters
2014-05-31tests: Add test for break in for.Paul Sokolovsky
For #635 / 25c84643b6c4da169cdb11de54f027e3c477c301.
2014-05-30objstr: *strip(): If nothing is stripped, don't create dup string.Paul Sokolovsky
2014-05-30objstr: *strip(): Fix handling of one-char subject strings.Paul Sokolovsky
2014-05-29py: Implement bignum '&' with negatives on lhs and rhs.Damien George
Needs proper coverage testing. Doesn't implement -ve & -ve. Addresses issue #611.
2014-05-28tests: Add argument to allow specifying which directories to teststijn
2014-05-26tests: Add small testcase for 3-arg slices.Paul Sokolovsky
2014-05-25objlist: Implement support for arbitrary (3-arg) slices.Paul Sokolovsky
2014-05-25objlist: Implement growing slice assignment.Paul Sokolovsky
This means that complete slice operations are supported for lists (but not for bytearray's and array.array's).
2014-05-24objstr: Implement .endswith().Paul Sokolovsky
2014-05-22py: Initial attempts to actually allow implementing __new__ in Python.Paul Sokolovsky
Caveat is that __new__ should recurse to base class __new__, and ultimately, object.__new__ is what handles instance allocation.
2014-05-21objtype: super: Fall back to "object" lookup as last resort.Paul Sokolovsky
Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520.
2014-05-21Merge pull request #607 from Anton-2/osx-clangDamien George
Allow compilation of unix port under clang on OS X
2014-05-19tests: Update subclass-native2.py for __new__/__init__ refactor.Paul Sokolovsky
Now case of subclassing tuple works, and list is broken, see comments.
2014-05-15objstr: startswith(): Accept optional "start" arg.Paul Sokolovsky
2014-05-15py: Implement more complete bytes comparison handling.Paul Sokolovsky
2014-05-15sequence: Fix yet another case of improper sequence comparison.Paul Sokolovsky
This time, in mp_seq_cmp_bytes(). How many more cases are still lurking?
2014-05-14objstr.c: Partial implementation of .rsplit().Paul Sokolovsky
sep=None is TODO.
2014-05-13tests/int-long.py: Try to expose issue with recent "&" optimization.Paul Sokolovsky
2014-05-12py: Fix bug in mpz_and function.Damien George
Addresses issue #610.
2014-05-12modstruct: Implement count specifier for strings (e.g. "100s").Paul Sokolovsky
Infra for counts of other types is there, need last mile to be implemented.
2014-05-12tests: create result file for test/basics/memoryerror.py .Antonin ENFRUN
On Mac OS "python3 test/basics/memoryerror.py" never runs out of memory, the process is frozen by the os before.
2014-05-11objstr: Slice indexing: support bytes properly.Paul Sokolovsky
2014-05-11objstr: Make .split() support bytes.Paul Sokolovsky
2014-05-11objstr: Make .join() support bytes.Paul Sokolovsky
2014-05-11py: Add basic implementation of hasattr() function.Paul Sokolovsky
2014-05-11py: frozenset() creates an empty frozenset.Damien George
2014-05-11Merge pull request #603 from stinos/windows-tests-newlineDamien George
tests: Fix handling of newlines from expected output files on windows
2014-05-11py: Give up and make mp_obj_str_get_data() deal with bytes too.Paul Sokolovsky
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.
2014-05-11tests: Fix handling of newlines from expected output filesstijn
2014-05-11objstr: Make *strip() accept bytes.Paul Sokolovsky
2014-05-11tests: Really fix import.Paul Sokolovsky
2014-05-11tests: Fix import.Paul Sokolovsky
2014-05-11objtuple: Go out of the way to support comparison of subclasses.Paul Sokolovsky
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.
2014-05-11py: Don't try to "bind" types store as attributes of objects.Paul Sokolovsky
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?
2014-05-11objstr: Make .[r]partition() work with bytes.Paul Sokolovsky
2014-05-10objlist: Support list slice deletion.Paul Sokolovsky
2014-05-10objlist: Implement non-growing slice assignment.Paul Sokolovsky
Slice value to assign can be only a list so far too.
2014-05-10objtype: Implement ->getiter() method for instances.Paul Sokolovsky
Includes support for native bases.
2014-05-10objnamedtuple: Support iteration.Paul Sokolovsky
2014-05-10objstr: Implement .lower() and .upper().Paul Sokolovsky
2014-05-10objset: Add frozenset tests, skippable if frozenset not available.Paul Sokolovsky
2014-05-10run-tests: Add support for skipping tests.Paul Sokolovsky
MicrpPython test should print single "SKIP" line for test to be skipped.
2014-05-10objtype: Don't treat inheritance from "object" as from native type.Paul Sokolovsky
"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.