micropython/tests/basics
Damien George c2a4e4effc py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.
Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as
the operator argument.  Hashing for int, str and bytes still go via
fast-path in mp_unary_op since they are the most common objects which
need to be hashed.

This lead to quite a bit of code cleanup, and should be more efficient
if anything.  It saves 176 bytes code space on Thumb2, and 360 bytes on
x86.

The only loss is that the error message "unhashable type" is now the
more generic "unsupported type for __hash__".
2015-05-12 22:46:02 +01:00
..
0prelim.py
andor.py
array1.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
array_add.py
array_construct.py tests: Skip some new tests when testing native emitter. 2015-03-25 23:33:48 +00:00
array_construct2.py tests: Skip some new tests when testing native emitter. 2015-03-25 23:33:48 +00:00
assign1.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
attrtuple1.py tests: Add tests for attrtuple, and for more corner cases. 2015-04-22 16:52:03 +01:00
bool1.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
boundmeth1.py tests: Add tests for boundmeth; and bignum cmp, unary, float, error. 2015-03-03 16:45:39 +00:00
break.py
builtin_abs.py py: Fix builtin abs so it works for bools and bignum. 2015-03-14 22:07:30 +00:00
builtin_allany.py tests: Use range as iterable instead of list comprehension. 2015-03-02 17:55:55 +00:00
builtin_bin.py
builtin_callable.py
builtin_chr.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_compile.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_dir.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_divmod.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_ellipsis.py
builtin_eval.py
builtin_eval_error.py
builtin_hash.py py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function. 2015-05-12 22:46:02 +01:00
builtin_hex.py
builtin_id.py
builtin_len1.py
builtin_minmax.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_oct.py
builtin_ord.py py: Fix builtin ord so that it can handle bytes values >= 0x80. 2015-04-19 12:26:46 +01:00
builtin_override.py
builtin_pow.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_property.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_range.py tests: Add some more tests to improve code coverage of corner cases. 2015-04-05 00:03:43 +01:00
builtin_reversed.py
builtin_round.py
builtin_slice.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_sorted.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
builtin_sum.py tests: Use range as iterable instead of list comprehension. 2015-03-02 17:55:55 +00:00
bytearray1.py
bytearray_add.py
bytearray_construct.py
bytearray_longint.py
bytearray_slice_assign.py objarray: Support assignment of bytes to bytearray slice. 2015-04-16 00:51:12 +03:00
bytes.py tests: Add tests to exercise lexer; and some more complex number tests. 2015-04-04 23:16:22 +01:00
bytes_add.py
bytes_compare.py
bytes_compare2.py
bytes_construct.py objstr: Fix bytes creation from array of long ints. 2015-02-09 12:11:49 +08:00
bytes_count.py
bytes_find.py
bytes_gen.py
bytes_large.py
bytes_mult.py
bytes_partition.py
bytes_replace.py
bytes_split.py
bytes_strip.py
class1.py
class2.py
class3.py
class_binop.py
class_call.py
class_contains.py
class_descriptor.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
class_emptybases.py
class_getattr.py
class_inherit1.py
class_inherit_mul.py
class_instance_override.py
class_item.py
class_new.py
class_number.py
class_staticclassmethod.py
class_store.py
class_store_class.py
class_str.py
class_super.py
class_super_object.py
closure1.py
closure2.py
closure_defargs.py
closure_manyvars.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
closure_namedarg.py py: Fix naming of function arguments when function is a closure. 2015-05-06 13:55:33 +01:00
compare_multi.py
comprehension1.py
containment.py
continue.py
decorator.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
del_attr.py
del_deref.py
del_global.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
del_local.py
del_name.py
del_subscr.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
dict1.py
dict2.py tests: Add tests for op special meths, ubinascii, complex. 2015-03-02 12:47:44 +00:00
dict_clear.py
dict_construct.py
dict_copy.py
dict_del.py
dict_from_iter.py
dict_fromkeys.py
dict_get.py
dict_intern.py
dict_iterator.py
dict_pop.py
dict_popitem.py
dict_setdefault.py
dict_specialmeth.py tests: Add tests for op special meths, ubinascii, complex. 2015-03-02 12:47:44 +00:00
dict_update.py
dict_views.py
enumerate.py
equal.py
equal_class.py
except_match_tuple.py
exception1.py
exceptpoly.py
exec1.py
filter.py
floordivide.py
for1.py
for2.py
for3.py
for_break.py
for_return.py
frozenset1.py
frozenset_add.py
frozenset_binop.py
frozenset_copy.py
frozenset_difference.py
fun1.py
fun2.py
fun3.py
fun_annotations.py
fun_calldblstar.py
fun_callstar.py
fun_callstardblstar.py
fun_defargs.py
fun_defargs2.py
fun_error.py tests: Add some more tests to improve code coverage of corner cases. 2015-04-05 00:03:43 +01:00
fun_kwargs.py
fun_kwonly.py
fun_kwonlydef.py
fun_kwvarargs.py
fun_largestate.py
fun_name.py tests: Convert line endings in fun_name.py from CRLF to LF. 2015-04-16 22:09:17 +01:00
fun_str.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
fun_varargs.py
gc1.py tests: Add basics test for gc module. 2015-03-02 18:30:17 +00:00
gen_yield_from.py
gen_yield_from_close.py
gen_yield_from_ducktype.py vm: Properly handle StopIteration raised in user instance iterator. 2015-05-11 23:57:42 +01:00
gen_yield_from_exc.py
gen_yield_from_iter.py py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION. 2015-05-10 00:41:49 +03:00
gen_yield_from_send.py
gen_yield_from_throw.py
generator1.py
generator2.py
generator_args.py
generator_close.py
generator_closure.py
generator_exc.py
generator_return.py
generator_send.py
getattr.py
getattr1.py
getitem.py tests: Add some more tests to improve code coverage of corner cases. 2015-04-05 00:03:43 +01:00
globals_del.py
hasattr1.py
ifcond.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
int1.py tests: Add tests for attrtuple, and for more corner cases. 2015-04-22 16:52:03 +01:00
int2.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
int_big_and.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
int_big_cmp.py tests: Add tests for boundmeth; and bignum cmp, unary, float, error. 2015-03-03 16:45:39 +00:00
int_big_div.py
int_big_error.py tests: Add tests for boundmeth; and bignum cmp, unary, float, error. 2015-03-03 16:45:39 +00:00
int_big_lshift.py
int_big_mod.py
int_big_mul.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
int_big_or.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
int_big_rshift.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
int_big_unary.py tests: Add tests for boundmeth; and bignum cmp, unary, float, error. 2015-03-03 16:45:39 +00:00
int_big_xor.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
int_big_zeroone.py
int_bytes.py py: Support conversion of bignum to bytes. 2015-04-25 23:16:39 +01:00
int_divmod.py
int_divzero.py
int_long.py
int_mpz.py tests: Add tests for attrtuple, and for more corner cases. 2015-04-22 16:52:03 +01:00
int_small.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
is_isnot.py
iter0.py py: Simplify and remove redundant code for __iter__ method lookup. 2015-02-15 01:10:13 +00:00
iter1.py py: Simplify and remove redundant code for __iter__ method lookup. 2015-02-15 01:10:13 +00:00
iter2.py
iter_of_iter.py
lambda1.py
lexer.py tests: Add tests to exercise lexer; and some more complex number tests. 2015-04-04 23:16:22 +01:00
list1.py
list_clear.py
list_compare.py
list_copy.py
list_count.py
list_index.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
list_insert.py
list_mult.py
list_pop.py
list_remove.py
list_reverse.py
list_slice.py
list_slice_3arg.py
list_slice_assign.py
list_slice_assign_grow.py
list_sort.py
list_sum.py
map.py
memoryerror.py
memoryerror.py.exp
memoryview1.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
memoryview_gc.py
module1.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
module2.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
module2.py.exp tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
namedtuple1.py tests: Add some more tests to improve code coverage of corner cases. 2015-04-05 00:03:43 +01:00
object1.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
object_new.py py: Check that arg to object.__new__ is a user-defined type. 2015-05-04 11:08:40 +01:00
op_error.py tests: Add missing tests for builtins, and many other things. 2015-04-04 22:05:30 +01:00
ordereddict1.py tests: Add basic test for OrderedDict. 2015-03-20 17:26:10 +00:00
print.py
return1.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
seq_unpack.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
set1.py
set_add.py
set_binop.py
set_clear.py
set_copy.py
set_difference.py
set_discard.py
set_intersection.py
set_isdisjoint.py
set_isfooset.py
set_iter.py
set_pop.py
set_remove.py
set_specialmeth.py tests: Add tests for op special meths, ubinascii, complex. 2015-03-02 12:47:44 +00:00
set_symmetric_difference.py
set_union.py
set_update.py
setattr1.py py: Add setattr builtin. 2015-02-14 23:35:00 +00:00
slots_bool_len.py
string1.py tests: Add tests to exercise lexer; and some more complex number tests. 2015-04-04 23:16:22 +01:00
string_compare.py
string_count.py
string_cr_conversion.py
string_crlf_conversion.py
string_endswith.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
string_escape.py
string_find.py
string_format.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
string_format_modulo.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
string_index.py
string_istest.py
string_join.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
string_large.py
string_mult.py
string_partition.py
string_replace.py tests: Add some more tests for bytes, bignum, string and ujson. 2015-03-14 21:20:58 +00:00
string_repr.py
string_rfind.py
string_rindex.py
string_rpartition.py
string_rsplit.py
string_slice.py
string_split.py objstr: split(None): Fix whitespace properly. 2015-04-12 00:17:57 +03:00
string_splitlines.py tests: Add test for str.splitlines(). 2015-04-04 00:09:54 +03:00
string_startswith.py
string_strip.py
string_upperlow.py
struct1.py modstruct: Rename module to "ustruct", to allow full Python-level impl. 2015-05-04 16:53:52 +03:00
subclass_classmethod.py
subclass_native1.py
subclass_native2_list.py
subclass_native2_tuple.py
subclass_native3.py
subclass_native4.py
subclass_native5.py
subclass_native_buffer.py py: Allow subclass of native object to delegate to the native buffer_p. 2015-02-09 15:08:00 +00:00
subclass_native_cmp.py
subclass_native_specmeth.py
syntaxerror.py tests: Add tests for attrtuple, and for more corner cases. 2015-04-22 16:52:03 +01:00
sys1.py tests: Add tests for attrtuple, and for more corner cases. 2015-04-22 16:52:03 +01:00
true_value.py
try1.py
try2.py
try3.py
try4.py
try_as_var.py
try_error.py tests: Add tests for SyntaxError, TypeError, and other missing things. 2015-03-25 23:10:09 +00:00
try_finally1.py
try_finally_loops.py
try_finally_return.py
try_reraise.py
try_reraise2.py
tuple1.py
tuple_compare.py
tuple_count.py
tuple_index.py
tuple_mult.py
types1.py
types2.py
unary_op.py
unboundlocal.py
unpack1.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
while1.py
while_cond.py tests: Add tests for things that are not already tested. 2015-03-12 22:48:45 +00:00
while_nest_exc.py
with1.py
with_break.py
with_continue.py
with_return.py
zip.py