Daniel Campora
e77abc261b
cc3200: Default peripheral ID support on I2C.
2015-09-16 10:10:19 +02:00
Daniel Campora
7d6b6f6681
cc3200: Make UART choose default id when not given.
2015-09-16 10:10:13 +02:00
Tom Soulanille
aeb62f9ae3
py/objslice: Make slice attributes (start/stop/step) readable.
...
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS. Disabled by default.
2015-09-15 21:59:20 +01:00
Tom Soulanille
04fffe6562
tests/README: Explain how tests get skipped
2015-09-15 20:05:05 +03:00
Damien George
8b4fb4fe14
py/mpz: Fix calculation of max digit storage for mpz; fix sys.maxsize.
...
When creating constant mpz's, the length of the mpz must be exactly how
many digits are used (not allocated) otherwise these numbers are not
compatible with dynamically allocated numbers.
Addresses issue #1448 .
2015-09-15 16:15:57 +01:00
Damien George
3ca84026db
unix: Enable REPL auto-indent.
2015-09-12 22:09:18 +01:00
Dave Hylands
9d6128acdc
stmhal: fix single precision float printing error
...
Fixes #1435 .
2015-09-11 23:09:50 +03:00
Daniel Campora
f352fe82a5
tests/wipy: Add I2C tests.
2015-09-10 08:00:59 +02:00
Daniel Campora
d265df589e
tests/wipy: Disable the REPL on UART before running the UART test.
2015-09-10 08:00:53 +02:00
Daniel Campora
4cc0cd6cab
tests/wipy: Additional tests for when the UART is un-initialized.
2015-09-10 08:00:35 +02:00
Daniel Campora
4d7fa05b43
cc3200: Improve Pin and UART implementation.
...
Deassign pins af before assigning. Make uart.any() return the
correct value everytime, this requires interrupts to be always
enabled.
2015-09-10 08:00:12 +02:00
Daniel Campora
f8b98d8329
tests/wipy: Improve UART tests with no pin assignment case.
2015-09-10 07:59:59 +02:00
Daniel Campora
88ca6c94d9
tests: Ignore exception chain test on the WiPy.
...
Fails because warnings are not enabled on the CC3200.
2015-09-10 07:59:53 +02:00
Daniel Campora
f91f212d9f
cc3200: New UART API plus related test.
2015-09-10 07:59:47 +02:00
Daniel Campora
36821d095a
cc3200: Add alternate functions list to Pin object.
...
Also remove pin.high() and pin.low() methods.
2015-09-10 07:59:41 +02:00
Daniel Campora
d5e256486e
cc3200: Re-work Pin class according to the new API.
...
Also add relevant test.
2015-09-10 07:59:35 +02:00
Damien George
75a811a6df
tests: Move int+unicode test to unicode-specific test directory.
2015-09-07 21:36:24 +01:00
Damien George
2b000474d9
py/lexer: Properly classify floats that look like hex numbers.
...
Eg 0e0 almost looks like a hex number but in fact is a float.
2015-09-07 17:33:44 +01:00
Damien George
0be3c70cd8
py/lexer: Raise SyntaxError when unicode char point out of range.
2015-09-07 17:19:17 +01:00
Damien George
081f9325f5
py/lexer: Raise NotImplError for unicode name escape, instead of assert.
2015-09-07 17:08:49 +01:00
Damien George
a7ffa972f3
tests: Add tests for non-compliant behaviour of lexer.
2015-09-07 16:59:55 +01:00
Damien George
558a016e2c
py/compile: Refine SyntaxError for repeated use of global/nonlocal.
2015-09-07 16:55:02 +01:00
Damien George
55b11e6d38
py/objstr: For str.endswith(s, start) raise NotImpl instead of assert.
2015-09-04 16:49:56 +01:00
Damien George
25afc7da0d
tests: Add tests to improve coverage of objstr.c.
2015-09-03 23:06:18 +01:00
Damien George
81794fcd31
py/binary: Add support for array('q') and array('Q').
2015-09-01 16:31:48 +01:00
Damien George
22602cc37b
py/objstr: Make str.rsplit(None,n) raise NotImpl instead of assert(0).
2015-09-01 15:35:31 +01:00
Paul Sokolovsky
1b693543aa
tests: Skip exception_chain.py with native emitter.
2015-09-01 11:53:27 +03:00
Paul Sokolovsky
ab2594e341
tests: Add test for exception-chaining raise syntax.
2015-09-01 10:39:11 +03:00
Damien George
39c91d3624
tests: Fix non-compliant expected output to match actual behaviour.
2015-08-30 12:46:08 +01:00
Damien George
000730ecaa
py/objstr: Simplify error handling for bad conversion specifier.
2015-08-30 12:43:21 +01:00
Damien George
c9fa667252
tests: Add tests for non-compliant behaviour.
...
These tests are intended to improve coverage and provide a record of
behaviour that's either not implemented or non-compliant to CPython.
2015-08-30 12:32:26 +01:00
Damien George
c2ec2ad8fb
tests: Add test where __getitem__ raises IndexError to stop iteration.
2015-08-30 11:49:59 +01:00
Paul Sokolovsky
a3fe307400
tests: Consolidate all feature check snippets under feature_check/.
2015-08-30 11:36:42 +03:00
Paul Sokolovsky
1a1b48e51a
tests: Add feature_check dir to collect capability detection scripts.
...
Which are currently intermixed with real scripts and spread around various
dirs.
2015-08-30 11:11:18 +03:00
Damien George
b648e98ad0
py/objstr: Fix error reporting for unexpected end of modulo format str.
2015-08-29 23:13:51 +01:00
Damien George
7ef75f9f75
py/objstr: Fix error type for badly formatted format specifier.
...
Was KeyError, should be ValueError.
2015-08-29 23:13:51 +01:00
Damien George
51b9a0d0c4
py/objstr: Make string formatting 8-bit clean.
2015-08-29 23:13:51 +01:00
Damien George
1d350b8ac6
tests: Add a few tests for bool, bytearray, float to improve coverage.
2015-08-29 23:13:28 +01:00
Paul Sokolovsky
a488c266c3
tests: Add byteorder query script.
2015-08-30 01:04:04 +03:00
Paul Sokolovsky
58d9b10d70
tests: Split byteorder-dependent tests to *_endian.py's.
2015-08-30 00:38:00 +03:00
Paul Sokolovsky
0a8b5d160b
run-tests: Allow to skip byteorder-dependent tests.
...
If byteorder of MicroPython under test and host CPython differ.
2015-08-30 00:37:53 +03:00
Paul Sokolovsky
5cb524673e
tests/ffi_float: Split tgammaf() testcase to a separate test.
...
Some libc's may implement tgammaf as a header macro using tgamma(), so
don't assume it'll be in the library.
2015-08-29 17:24:29 +03:00
Paul Sokolovsky
a160b70ced
tests: Add test on set/frozenset equality.
2015-08-28 22:42:01 +03:00
Paul Sokolovsky
8b3b2d04a8
objset: frozensets are hashable.
2015-08-28 22:31:52 +03:00
Damien George
936e25b164
tests: For unix ffi float test, add libm.so.6 to library search list.
...
Latest Arch Linux doesn't have libm.so as a proper shared object and so
we need to load libm.so.6.
2015-08-25 18:14:53 +01:00
Damien George
d007cb8903
tests: Add more tests to improve coverage, mostly testing exceptions.
2015-08-21 12:02:09 +01:00
Damien George
d292a81e95
tests: Make io test cleanup after itself by removing 'testfile'.
2015-08-21 08:45:52 +01:00
Damien George
65dc960e3b
unix-cpy: Remove unix-cpy. It's no longer needed.
...
unix-cpy was originally written to get semantic equivalent with CPython
without writing functional tests. When writing the initial
implementation of uPy it was a long way between lexer and functional
tests, so the half-way test was to make sure that the bytecode was
correct. The idea was that if the uPy bytecode matched CPython 1-1 then
uPy would be proper Python if the bytecodes acted correctly. And having
matching bytecode meant that it was less likely to miss some deep
subtlety in the Python semantics that would require an architectural
change later on.
But that is all history and it no longer makes sense to retain the
ability to output CPython bytecode, because:
1. It outputs CPython 3.3 compatible bytecode. CPython's bytecode
changes from version to version, and seems to have changed quite a bit
in 3.5. There's no point in changing the bytecode output to match
CPython anymore.
2. uPy and CPy do different optimisations to the bytecode which makes it
harder to match.
3. The bytecode tests are not run. They were never part of Travis and
are not run locally anymore.
4. The EMIT_CPYTHON option needs a lot of extra source code which adds
heaps of noise, especially in compile.c.
5. Now that there is an extensive test suite (which tests functionality)
there is no need to match the bytecode. Some very subtle behaviour is
tested with the test suite and passing these tests is a much better
way to stay Python-language compliant, rather than trying to match
CPy bytecode.
2015-08-17 12:51:26 +01:00
blmorris
bdd78c31b6
py: Add stream_tell method, and use for unix and stmhal file tell.
2015-08-13 22:56:32 +01:00
Tom Soulanille
20f40c3229
tests: Remove over-specification of startup banner
2015-08-08 12:37:36 +01:00