circuitpython/tests/basics
Damien George 491cbd6a7c py: Add keyword arg support to enumerate constructor.
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.
2014-05-06 16:38:54 +00:00
..
0prelim.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
array1.py Rename array test to array1 so it doesn't clash with array module. 2014-01-28 23:12:35 +00:00
break.py py: Implement break and continue byte codes, and add tests. 2014-01-21 23:48:04 +00:00
builtin-bin.py py: Add builtin functions bin and oct, and some tests for them. 2014-04-15 22:03:55 +01:00
builtin-callable.py mp_obj_is_callable(): Only object types can be callable. 2014-01-23 03:37:21 +02:00
builtin-hex.py py: Add builtin functions bin and oct, and some tests for them. 2014-04-15 22:03:55 +01:00
builtin-len1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
builtin-minmax.py Fix the builtin min() and max() functions (and add tests). 2014-05-01 21:21:43 +01:00
builtin-oct.py py: Add builtin functions bin and oct, and some tests for them. 2014-04-15 22:03:55 +01:00
builtin_id.py Fix unstable case in builtin_id.py test. 2014-02-04 00:50:22 +02:00
bytearray1.py objarray: Implement slice subscription. 2014-04-19 20:06:57 +03:00
bytes.py py: Make 'bytes' be a proper type, support standard constructor args. 2014-03-22 00:07:04 +02:00
class-emptybases.py py: Factor out static/class method unwrapping code; add tests. 2014-04-02 14:13:26 +01:00
class-getattr.py py: Factor out static/class method unwrapping code; add tests. 2014-04-02 14:13:26 +01:00
class-staticclassmethod.py py: Factor out static/class method unwrapping code; add tests. 2014-04-02 14:13:26 +01:00
class-subclass-builtin.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class-super.py test/class-super: Expose super() breakage. 2014-04-19 21:54:06 +03:00
class1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class2.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class3.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class_call.py py: Support instance __call__ method. 2014-04-25 21:17:42 +03:00
class_inherit1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class_inherit_mul.py tests: Add testcase for multiple inheritance. 2014-03-31 19:46:35 +03:00
class_item.py py: Implement __delitem__ method for classes. 2014-04-15 01:30:25 +03:00
class_number.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class_store.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
class_str.py Implement support for __str__ and __repr__ special methods in classes. 2014-03-16 15:18:22 +02:00
closure-defargs.py py: Factor out static/class method unwrapping code; add tests. 2014-04-02 14:13:26 +01:00
closure1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
closure2.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
compare-multi.py tests: Add test for multi-comparison. 2014-04-10 17:29:51 +00:00
comprehension1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
containment.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
continue.py py: Implement break and continue byte codes, and add tests. 2014-01-21 23:48:04 +00:00
del-attr.py tests: Oops: fix del-attr. 2014-04-08 23:02:24 +01:00
del-deref.py py: Properly implement deletion of locals and derefs, and detect errors. 2014-04-09 15:26:46 +01:00
del-local.py py: Properly implement deletion of locals and derefs, and detect errors. 2014-04-09 15:26:46 +01:00
del-name.py py: Remove DELETE_SUBSCR opcode, combine with STORE_SUBSCR. 2014-04-08 21:32:29 +01:00
del-subscr.py py: Remove DELETE_SUBSCR opcode, combine with STORE_SUBSCR. 2014-04-08 21:32:29 +01:00
dict-del.py py: Fix delete operation on map/dict and set objects. 2014-04-05 17:17:19 +01:00
dict-from-iter.py py: Check that sequence has 2 elements for dict iterable constructor. 2014-04-11 09:13:30 +01:00
dict-intern.py py: Fix bug in map lookup of interned string vs non-interned. 2014-04-28 12:11:57 +01:00
dict1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict2.py objdict: Implement __getitem__ method. 2014-04-11 05:24:44 +03:00
dict_clear.py tests: Fix few tests which depend on order of elements in dict. 2014-04-06 21:31:42 +03:00
dict_copy.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict_fromkeys.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict_get.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict_iterator.py tests: Fix few tests which depend on order of elements in dict. 2014-04-06 21:31:42 +03:00
dict_pop.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict_popitem.py tests: Fix few tests which depend on order of elements in dict. 2014-04-06 21:31:42 +03:00
dict_setdefault.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
dict_update.py tests: Fix few tests which depend on order of elements in dict. 2014-04-06 21:31:42 +03:00
dict_views.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
enumerate.py py: Add keyword arg support to enumerate constructor. 2014-05-06 16:38:54 +00:00
equal.py py: Remove useless implementations of NOT_EQUAL in binary_op's. 2014-04-12 00:20:39 +01:00
eval1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
exception1.py objexcept: Add "args" exception attribute, as well as StopIteration.value. 2014-03-25 01:42:01 +02:00
exceptpoly.py tests: Remove unimplemented exceptions from testing. 2014-03-29 11:43:00 +00:00
exec1.py Implement full arg handling for exec(). 2014-02-13 00:36:54 +02:00
filter.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
floordivide.py Fixed floor division on mp ints and small ints. Added a floordivide test case. 2014-03-22 20:19:24 +00:00
for1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
for2.py py: Fix bug in optimised for .. range. 2014-03-31 18:02:22 +01:00
fun-annotations.py Clean up handling of function return type annotation. 2014-02-10 02:04:26 +02:00
fun-calldblstar.py py: Implement positional and keyword args via * and **. 2014-03-30 21:21:24 +01:00
fun-callstar.py tests: Remove print('flush') from 2 tests, since stmhal now works. 2014-04-17 00:14:05 +01:00
fun-callstardblstar.py py: Implement positional and keyword args via * and **. 2014-03-30 21:21:24 +01:00
fun-defargs.py tests: Remove print('flush') from 2 tests, since stmhal now works. 2014-04-17 00:14:05 +01:00
fun-defargs2.py objfun: Fix default arguments filling loop, was broken in presense of kwargs. 2014-04-10 05:39:38 +03:00
fun-kwargs.py Support passing positional args as keywords to bytecode functions. 2014-02-16 18:36:33 +02:00
fun-kwonly.py py: Implement keyword-only args. 2014-04-27 15:50:52 +01:00
fun-kwvarargs.py Rename fun-kwargs.py -> fun-kwvarargs.py to free up slot for simple kw test. 2014-02-16 15:55:06 +02:00
fun-varargs.py py: Implement *vargs support. 2014-02-16 00:01:29 +00:00
fun1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
fun2.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
fun3.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
gen-yield-from-close.py tests: Add testcases for yield from. 2014-03-28 02:50:56 +02:00
gen-yield-from-ducktype.py py: Implement support for generalized generator protocol. 2014-03-30 23:30:16 +03:00
gen-yield-from-exc.py tests: Add testcases for yield from. 2014-03-28 02:50:56 +02:00
gen-yield-from-iter.py py: Implement support for generalized generator protocol. 2014-03-30 23:30:16 +03:00
gen-yield-from-send.py tests: Add testcases for yield from. 2014-03-28 02:50:56 +02:00
gen-yield-from-throw.py tests: Add testcases for yield from. 2014-03-28 02:50:56 +02:00
gen-yield-from.py tests: Add testcases for yield from. 2014-03-28 02:50:56 +02:00
generator-args.py objgenerator: Handle default args to generator functions. 2014-03-30 20:25:19 +03:00
generator-closure.py py: Generators can have their locals closed over. 2014-04-09 19:01:45 +01:00
generator-exc.py objgenerator: Implement .throw() method to throw exceptions into generator. 2014-03-22 17:55:42 +02:00
generator-return.py objgenerator: Implement return with value and .close() method. 2014-03-26 15:40:58 +02:00
generator1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
generator2.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
generator_close.py objgenerator: Implement return with value and .close() method. 2014-03-26 15:40:58 +02:00
generator_send.py gen.send(): Throw StopIteration. Also, explicitly shutdown finished gen. 2014-01-27 01:07:58 +02:00
getattr.py py: Implement __getattr__. 2014-03-31 22:57:56 +01:00
getattr1.py py: Support 3-arg getattr() builtin (with default value). 2014-04-05 13:34:02 +03:00
getitem.py py: Implement iterator support for object that has __getitem__. 2014-01-25 00:17:36 +00:00
globals-del.py tests: Add test to check issue #429. 2014-04-05 18:17:51 +01:00
int-big-lshift.py Add more tests. 2014-04-02 14:23:04 +01:00
int-big-mod.py py: Add mpz modulo operation. 2014-03-20 16:28:41 +00:00
int-big-mul.py Add more tests for multi-precision integers. 2014-03-12 15:39:51 +00:00
int-bytes.py objint: Implement int.from_bytes() class method and .to_bytes() method. 2014-04-09 01:07:37 +03:00
int-divzero.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
int-long.py objint_longlong: Add regression test for improper inplace op implementation. 2014-03-22 00:04:04 +02:00
int-mpz.py py: Implement bit-shift and not operations for mpz. 2014-03-01 19:50:50 +00:00
int-small.py parse: Refactor parse node encoding to support full range of small ints. 2014-02-22 16:39:45 +02:00
int1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
is-isnot.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
iter-of-iter.py tests: Fix tests with sets to print sorted set. 2014-04-07 00:42:09 +01:00
iter1.py py: Replace mp_const_stop_iteration object with MP_OBJ_NULL. 2014-03-26 19:27:58 +00:00
iter2.py py: Replace mp_const_stop_iteration object with MP_OBJ_NULL. 2014-03-26 19:27:58 +00:00
lambda1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list1.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
list_clear.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_compare.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_copy.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_count.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_index.py Implement str.count and add tests for it. 2014-03-12 22:57:16 -07:00
list_insert.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_mult.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_pop.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_remove.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_reverse.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
list_slice.py Add more tests. 2014-04-02 14:23:04 +01:00
list_sort.py Add tests for sorted() function 2014-04-07 04:41:54 +01:00
list_sum.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
map.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
memoryerror.py run-tests can now skip certain tests when run under Travis CI 2014-04-16 03:28:40 +01:00
modulo.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
namedtuple1.py py: Rename collections module to _collections. 2014-04-13 10:24:00 +03:00
print.py py: Add support for sep and end keywords in print. 2014-04-02 10:34:44 +01:00
property.py tests: Add property test. 2014-04-13 19:00:27 +01:00
seq-unpack.py Add testcase for sequence unpacking. 2014-02-02 01:34:11 +02:00
set1.py tests: Fix tests with sets to print sorted set. 2014-04-07 00:42:09 +01:00
set_add.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_binop.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_clear.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_copy.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_difference.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_discard.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_intersection.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_isdisjoint.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_isfooset.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_iter.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_pop.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
set_remove.py py: Fix delete operation on map/dict and set objects. 2014-04-05 17:17:19 +01:00
set_symmetric_difference.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
set_union.py tests: Fix few tests which depend on order of elements in set. 2014-04-07 02:54:16 +03:00
set_update.py Modify set tests to print sorted sets directly 2014-04-07 05:00:03 +01:00
slots_bool_len.py py: Improve __bool__ and __len__ dispatch; add slots for them. 2014-01-30 10:05:33 +00:00
sorted.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
string-compare.py Implement str/bytes rich comparisons. 2014-02-02 08:58:16 +02:00
string-escape.py Implement octal and hex escapes in strings. 2014-01-22 22:48:25 +02:00
string-format-modulo.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
string-format.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
string-join.py py: str.join can now take arbitrary iterable as argument. 2014-04-09 19:17:53 +01:00
string-repr.py Display \r and \t escape codes in string repr 2014-04-08 02:42:50 +01:00
string-slice.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
string1.py str: Implement proper string (instead of byte string) indexing. 2014-01-21 02:25:59 +02:00
string_count.py py: In string.count, handle case of zero-length needle. 2014-03-13 22:07:55 +00:00
string_find.py Implement str.count and add tests for it. 2014-03-12 22:57:16 -07:00
string_index.py py: Implement str.[r]index() and add tests for them. 2014-04-08 11:51:41 -07:00
string_partition.py Implement str.partition and add tests for it. 2014-03-21 02:57:18 -07:00
string_replace.py py: Fix str.replace for case when arg 0 or 1 is empty string. 2014-04-07 00:39:13 +01:00
string_rfind.py Implement str.rfind() and add tests for it. 2014-03-24 01:00:00 -07:00
string_rindex.py py: Implement str.[r]index() and add tests for them. 2014-04-08 11:51:41 -07:00
string_rpartition.py Implement str.rpartition and add tests for it. 2014-03-21 02:58:09 -07:00
string_split.py py: str.split: handle non-default separator. 2014-04-06 11:11:15 +01:00
string_startswith.py Implement simplest case of str.startswith(). 2014-01-23 02:47:10 +02:00
string_strip.py objstr: Implement .lstrip() & .rstrip(). 2014-04-26 06:20:08 +03:00
struct1.py modstruct: Initial implementation of struct.pack(). 2014-04-19 03:22:08 +03:00
subclass-native1.py tests: Add basic tests for subclassing native types and using special methods. 2014-04-29 20:31:13 +03:00
subclass-native2.py tests: Add basic tests for subclassing native types and using special methods. 2014-04-29 20:31:13 +03:00
subclass-native3.py tests: Add testcases for catching user Exception subclasses. 2014-05-02 02:31:30 +03:00
subclass-native4.py tests: Add test for calling inherited native method on subclass. 2014-04-30 02:17:45 +03:00
true-value.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
try-as-var.py py: Implement support for "except Exception as var" clause. 2014-03-23 22:00:04 +02:00
try-finally-loops.py Add more finally + break/continue testcases. 2014-02-06 03:27:39 +02:00
try-finally-return.py Add additional testcase for finally/return. 2014-02-06 03:20:56 +02:00
try-finally1.py Add basic try-finally testcase. 2014-01-31 21:33:07 +02:00
try-reraise.py py: Reraising exception possible only in except block. 2014-03-29 23:18:59 +02:00
try-reraise2.py Add "tracing" to try-reraise2.py test. It now fails. 2014-03-30 00:39:15 +00:00
try1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
try2.py Add testcase with exception handler spread across functions. 2014-01-31 17:06:15 +02:00
try3.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
try4.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
tuple1.py Implement tuple addition. 2014-02-08 23:17:51 +02:00
tuple_compare.py sequence: Fix glaring bug in sequence comparison. 2014-04-18 21:42:54 +03:00
tuple_count.py Factor out mp_seq_count_obj() and implement tuple.count(). 2014-02-10 07:13:32 +02:00
tuple_index.py Implement tuple.index(). 2014-02-10 07:13:32 +02:00
tuple_mult.py Implement tuple multiplication. 2014-02-08 23:19:48 +02:00
types1.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
types2.py tests: Split out those tests requiring float and import. 2014-04-17 16:21:43 +01:00
unary_op.py py: Add unary op not for NoneType, bool, tuple, list, dict; fix for int. 2014-01-27 23:15:32 +00:00
unboundlocal.py py: Make all LOAD_FAST ops check for unbound local. 2014-04-12 18:20:40 +01:00
unpack1.py py: implement UNPACK_EX byte code (for: a, *b, c = d) 2014-04-08 17:51:47 +01:00
while1.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00
with-break.py tests: Add "with" statement testcases. 2014-03-29 04:39:31 +02:00
with-continue.py tests: Add "with" statement testcases. 2014-03-29 04:39:31 +02:00
with-return.py tests: Add "with" statement testcases. 2014-03-29 04:39:31 +02:00
with1.py tests: Make tests pass on pyboard. 2014-04-13 17:46:30 +01:00
zip.py Move tests in basic/tests/ up one level preparating to multiple test dirs. 2014-01-19 18:41:55 +02:00