Daniel Campora
e3f8777ee8
cc3200: Implement new Pin API.
9 years ago
Daniel Campora
ec8589e4c9
cc3200: Improve uniflash script and make it a bit more verbose.
9 years ago
Daniel Campora
b864e7afe4
cc3200: Remove the UART0 programming pins from the smoke test.
9 years ago
Damien George
75a811a6df
tests: Move int+unicode test to unicode-specific test directory.
9 years ago
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.
9 years ago
Damien George
0be3c70cd8
py/lexer: Raise SyntaxError when unicode char point out of range.
9 years ago
Damien George
081f9325f5
py/lexer: Raise NotImplError for unicode name escape, instead of assert.
9 years ago
Damien George
a7ffa972f3
tests: Add tests for non-compliant behaviour of lexer.
9 years ago
Damien George
558a016e2c
py/compile: Refine SyntaxError for repeated use of global/nonlocal.
9 years ago
Damien George
3a2171e406
py: Eliminate some cases which trigger unused parameter warnings.
9 years ago
Damien George
42cec5c893
py/objstr: Check for keyword args before checking for no posn args.
Otherwise something like bytes(abc=123) will succeed.
9 years ago
Damien George
55b11e6d38
py/objstr: For str.endswith(s, start) raise NotImpl instead of assert.
9 years ago
Damien George
0b7a66ab97
py/objbool: Simplify dispatch of bool binary op.
This optimises (in speed and code size) for the common case where the
binary op for the bool object is supported. Unsupported binary ops
still behave the same.
9 years ago
Damien George
ea5b59bfe6
py/compile: Only compile function annotations if really needed.
Function annotations are only needed when the native emitter is enabled
and when the current scope is emitted in viper mode. All other times
the annotations can be skipped completely.
9 years ago
Tony Abboud
8d8fdcb4be
stmhal: add option to query for the current usb mode
Fetch the current usb mode and return a string representation when
pyb.usb_mode() is called with no args. The possible string values are interned
as qstr's. None will be returned if an incorrect mode is set.
9 years ago
Damien George
821b7f22fe
py: Use mp_not_implemented consistently for not implemented features.
9 years ago
Damien George
25afc7da0d
tests: Add tests to improve coverage of objstr.c.
9 years ago
Damien George
e2aa117798
py/objstr: Simplify printing of bytes objects when unicode enabled.
9 years ago
Damien George
516982242d
py: Inline single use of mp_obj_str_get_len in mp_obj_len_maybe.
Gets rid of redundant double check for string type.
Also remove obsolete declaration of mp_obj_str_get_hash.
9 years ago
Paul Sokolovsky
8bf00084b6
py: Make "enumerate" qstr be conditional on MICROPY_PY_BUILTINS_ENUMERATE.
9 years ago
Damien George
81794fcd31
py/binary: Add support for array('q') and array('Q').
9 years ago
Damien George
22602cc37b
py/objstr: Make str.rsplit(None,n) raise NotImpl instead of assert(0).
9 years ago
Paul Sokolovsky
1b693543aa
tests: Skip exception_chain.py with native emitter.
9 years ago
Paul Sokolovsky
ab2594e341
tests: Add test for exception-chaining raise syntax.
9 years ago
Paul Sokolovsky
2ff2ea5f3b
vm: Handle "raise X from Y" statements the best way we can.
By issuing a warning that exception chaining is not supported, and ignoring
"from Y" argument.
9 years ago
Paul Sokolovsky
21ffa7c4ba
modbuiltins: Consistently use indentation for #if.
9 years ago
Paul Sokolovsky
696eee9475
modffi: dlsym() doesn't set errno, so use ENOENT for OSError.
This may be a bit confusing, as ENOENT is often rendered as "No such
file or directory", but any other code would be only more confusing.
9 years ago
Paul Sokolovsky
a9058bf294
unix: Allow to build libffi from source and link against it.
Linking against local libffi (and other libs in future) is triggered by
"make MICROPY_STANDALONE=1". Before that, dependent libs should be built
with "make deplibs".
9 years ago
Damien George
39c91d3624
tests: Fix non-compliant expected output to match actual behaviour.
9 years ago
Damien George
000730ecaa
py/objstr: Simplify error handling for bad conversion specifier.
9 years ago
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.
9 years ago
Damien George
c2ec2ad8fb
tests: Add test where __getitem__ raises IndexError to stop iteration.
9 years ago
Tom Soulanille
6433f71e8f
py/objgetitemiter: Make it_iternext() recognize IndexError.
9 years ago
Paul Sokolovsky
a3fe307400
tests: Consolidate all feature check snippets under feature_check/.
9 years ago
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.
9 years ago
Paul Sokolovsky
e8ad47a6ca
tools: Upgrade to upip 0.5.7.
Just dependent micropython-lib modules update for upip, no new
functionality.
9 years ago
Damien George
b648e98ad0
py/objstr: Fix error reporting for unexpected end of modulo format str.
9 years ago
Damien George
7ef75f9f75
py/objstr: Fix error type for badly formatted format specifier.
Was KeyError, should be ValueError.
9 years ago
Damien George
51b9a0d0c4
py/objstr: Make string formatting 8-bit clean.
9 years ago
Damien George
1d350b8ac6
tests: Add a few tests for bool, bytearray, float to improve coverage.
9 years ago
Paul Sokolovsky
a488c266c3
tests: Add byteorder query script.
9 years ago
Bob Clough
86e6ad76cb
stmhal: Add support for STM32F411 Discovery Board (STM32F411E-DISCO).
9 years ago
Paul Sokolovsky
58d9b10d70
tests: Split byteorder-dependent tests to *_endian.py's.
9 years ago
Paul Sokolovsky
0a8b5d160b
run-tests: Allow to skip byteorder-dependent tests.
If byteorder of MicroPython under test and host CPython differ.
9 years ago
Paul Sokolovsky
18c22faf4d
py: Treat -m32 flag as part of CC, LD, etc.
Indeed, this flag efectively selects architecture target, and must
consistently apply to all compiles and links, including 3rd-party
libraries, unlike CFLAGS, which have MicroPython-specific setting.
9 years ago
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.
9 years ago
Bill Owens
a66a99bfd8
esp8266: Added wifi_mode() to read and set WiFi operating mode.
10 years ago
Paul Sokolovsky
a160b70ced
tests: Add test on set/frozenset equality.
9 years ago
Paul Sokolovsky
8b3b2d04a8
objset: frozensets are hashable.
9 years ago
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.
9 years ago