Damien George
218a876f97
tests/basics/builtin_range: Add tests for negative slicing of range.
8 years ago
Damien George
e1b0f2a16f
tests/basics/list_slice_3arg: Add more tests for negative slicing.
8 years ago
Tom Collins
760aa0996f
tests/basics/lexer: Add line continuation tests for lexer.
Tests for an issue with line continuation failing in paste mode due to the
lexer only checking for \n in the "following" character position, before
next_char() has had a chance to convert \r and \r\n to \n.
8 years ago
Tom Collins
d00d062af2
tests/basics/lexer: Add lexer tests for input starting with newlines.
8 years ago
Damien George
e711e2d44a
tests/basics: Add memoryview test for big ints.
8 years ago
Damien George
2e9e14980d
tests/basics: Update array test for big-int with lL typecodes.
8 years ago
Damien George
084824f866
tests: Move super-as-local test from cpydiff to basic tests.
It's now possible to use the name "super" as a local variable.
8 years ago
Damien George
810133d97d
tests/basics: Add tests for int.from_bytes when src has trailing zeros.
The trailing zeros should be truncated from the converted value.
8 years ago
Damien George
30badd1ce1
tests: Add tests for calling super and loading a method directly.
8 years ago
Damien George
b6fff4186d
tests/basics: Add test for tuple inplace add.
8 years ago
Damien George
dcd8f52766
tests/basics: Add tests for raising ValueError when range() gets 0 step.
8 years ago
Damien George
bf51e2ff98
tests/basics: Add tests for list and bytearray growing using themselves.
8 years ago
Damien George
734775524e
tests/basics: Add test for super() when self is closed over.
8 years ago
Damien George
eeff0c3528
tests/basics/bytes_add: Add tests for optimised bytes addition.
8 years ago
Damien George
ecb4357fe1
tests/basics: Move string-modulo-format int tests to dedicated file.
8 years ago
Damien George
b154468b08
tests/basics: Add test for string module formatting with int argument.
8 years ago
Damien George
3a0b2be6e2
tests/basics/string_format2: Adjust comment now that tests succeed.
8 years ago
Damien George
05fec17d9b
tests/basics/struct_micropython: Add test for 'S' typecode in ustruct.
The 'S' typecode is a uPy extension so it should be grouped with the other
extension (namely 'O' typecode). Testing 'S' needs uctypes which is an
extmod module and not always available, so this test is made optional and
will only be run on ports that have (u)struct and uctypes. Otherwise it
will be silently skipped.
8 years ago
Paul Sokolovsky
c9705cff68
tests/basics/fun_error: Split out skippable test.
8 years ago
Paul Sokolovsky
ce63a95a85
tests/dict_fromkeys: Split out skippable part.
8 years ago
Paul Sokolovsky
983144404b
tests/basic: Make various tests skippable.
8 years ago
Krzysztof Blazewicz
1bd17de4b7
tests/basics/unpack1.py: Test if *a, = b copies b when b is a list.
8 years ago
Krzysztof Blazewicz
38c3778b27
tests/basics/string_join.py: Add test case where argument is not iterable.
8 years ago
Paul Sokolovsky
3ab6aa3a6d
tests/basic: Split tests into working with small ints and not working.
Tests which don't work with small ints are suffixed with _intbig.py. Some
of these may still work with long long ints and need to be reclassified
later.
8 years ago
Damien George
3d91c12d33
tests/basics: Add further tests for OrderedDict.
8 years ago
Damien George
f4a12dca58
py/objarray: Disallow slice-assignment to read-only memoryview.
Also comes with a test for this. Fixes issue #2904 .
8 years ago
Damien George
89267886cc
py/objlist: For list slice assignment, allow RHS to be a tuple or list.
Before this patch, assigning anything other than a list would lead to a
crash. Fixes issue #2886 .
8 years ago
Damien George
d87c6b6768
tests/basics/string_join: Add more tests for string concatenation.
8 years ago
Paul Sokolovsky
f980c70997
tests/basic/: Make various tests skippable.
To run the testsuite on small ports.
8 years ago
Paul Sokolovsky
b737c9cbc8
tests/gen_yield_from_close: Use range() instead of reversed().
As a "more basic" builtin iterator, present even in smaller ports.
8 years ago
Paul Sokolovsky
7bb146350e
tests/dict_fromkeys: Revert to use reversed() to run in native codegen mode.
8 years ago
Paul Sokolovsky
83623b2fde
tests/basic/[a-f]*: Make skippable.
For small ports which don't have all features enabled.
8 years ago
Paul Sokolovsky
d61ce32022
tests/builtin_dir: The most expected thing in sys is exit, test for it.
8 years ago
Paul Sokolovsky
800b163cd8
tests/comprehension1, containment: Split set tests to separate files.
To make skippable.
8 years ago
dmazzella
18e6569166
py/objtype: Implement __delattr__ and __setattr__.
This patch implements support for class methods __delattr__ and __setattr__
for customising attribute access. It is controlled by the config option
MICROPY_PY_DELATTR_SETATTR and is disabled by default.
8 years ago
Damien George
84fb292cd5
tests/basics/string_format_modulo: Add more tests for dict formatting.
8 years ago
Paul Sokolovsky
87882e1708
tests: Split tests for 2- and 3-arg pow().
8 years ago
Nicko van Someren
df0117c8ae
py: Added optimised support for 3-argument calls to builtin.pow()
Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
8 years ago
Damien George
05c70fdfba
tests/basics/set_binop: Add tests for inplace set operations.
8 years ago
Paul Sokolovsky
33b8e65bc0
tests/basics/zip: Make skippable.
8 years ago
Damien George
20fc620327
tests/basics/builtin_help: Add test for help('modules').
8 years ago
Damien George
1864f90e9a
tests: Add test for builtin help function.
8 years ago
Paul Sokolovsky
3b09dca046
tests: Add test for int.from_bytes() for arbitrary-precision integer.
This test works only for MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_MPZ
and needs a way of skipping in other cases.
8 years ago
Damien George
1639200e57
tests/basics: Add test for assignment of attribute to bound method.
8 years ago
Paul Sokolovsky
af90461931
py/binary: mp_binary_get_size: Raise error on unsupported typecodes.
Previouly, we had errors checked in callers, which led to duplicate code
or missing checks in some places.
8 years ago
Rami Ali
5314219f18
tests/basics: Improve runtime.c test coverage.
8 years ago
Damien George
96baaa68a4
tests: Update tests, and add new ones, for recent generator tweaks.
8 years ago
Damien George
65cadbeb9d
tests: Update test suite to be compatible with CPython 3.6.
CPython 3.6 has a few changes that, when run on uPy's test suite, give a
different output to CPython 3.5. uPy currently officially supports the
3.4 language definition, but it's useful to be able to run the test suite
with 3.4/3.5/3.6 versions of CPython. This patch makes such changes to
support 3.6.
8 years ago
Paul Sokolovsky
ef1bbada96
tests/array*: Allow to skip test if "array" is unavailable.
8 years ago
Paul Sokolovsky
e5a6a26330
tests/types1: Split out set type test to set_types.
set isn't the most basic type and can be disabled by a port.
8 years ago