Damien George
213a718953
tests/float: Add test for assigning to attribute of complex number.
8 years ago
Damien George
e873243aa3
py/objint_mpz: Refactor switch-statement to remove unreachable default.
8 years ago
Damien George
94a587a750
py/formatfloat: Remove unreachable code.
The if-block that this unreachable code is in has a condition "f>=5" so
"fp_isless1(f)" will always fail.
8 years ago
Pavol Rusnak
0883a7e72f
stmhal: Implement SNAK/CNAK mechanism for USB HID receive.
This implements flow control in case user does not call recv method often
enough (it tells host side to stop sending more data).
8 years ago
Pavol Rusnak
6ace84b089
stmhal: Implement ioctl for USB HID read.
8 years ago
Pavol Rusnak
89f2b62016
stmhal: Fix USB HID receive not receiving the first packet.
8 years ago
Mike Causer
c5310ee5b5
drivers: Fix some minor spelling mistakes.
respones -> response
succeses -> successes
8 years ago
Mike Causer
a79f6676c3
docs: Fix some minor spelling mistakes.
paramter -> parameter
send a receive -> send and receive
repsonse -> response
particualr -> particular
constructore -> constructor
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
5e80c53c11
tests/extmod: Improve test coverage of ure module.
8 years ago
Damien George
d7150b09d7
py/runtime: Refactor default case of switch to remove assert(0).
8 years ago
Damien George
5bea080737
py/objexcept: Replace if-cond and assert(0) with simple assert.
8 years ago
Damien George
f51f22dd42
py/emitnative: Remove assert(0)'s or replace with mp_not_implemented.
8 years ago
Damien George
86e942309a
py/parse: Refactor code to remove assert(0)'s.
This helps to improve code coverage. Note that most of the changes in
this patch are just de-denting the cases of the switch statements.
8 years ago
Rami Ali
5314219f18
tests/basics: Improve runtime.c test coverage.
8 years ago
Rami Ali
cba723fc8c
tests/io: Improve test coverage of io.BufferedWriter.
8 years ago
Damien George
96baaa68a4
tests: Update tests, and add new ones, for recent generator tweaks.
8 years ago
Damien George
239f920299
py/objgenerator: Don't raise RuntimeError if GeneratorExit ignored.
In this case it's allowed to be ignored.
8 years ago
Damien George
681994638b
py/objgenerator: When throwing an object, don't make an exc instance.
Arguments to throw() for generators don't need to be exceptions.
8 years ago
Damien George
aeb2655073
py/runtime: Fix handling of throw() when resuming generator.
If GeneratorExit is injected as a throw-value then that should lead to
the close() method being called, if it exists. If close() does not exist
then throw() should not be called, and this patch fixes this.
8 years ago
Damien George
40863fce6f
py/runtime: Refactor assert(0) to improve coverage.
8 years ago
Rami Ali
751e379533
tests: Improve frozen import test coverage.
8 years ago
Damien George
d23834bc96
py/builtinimport: Remove unreachable code and change obj-import comment.
8 years ago
Damien George
63e291de70
py/builtinimport: Raise ValueError for bad relative import, per CPython.
8 years ago
Damien George
9317fee523
unix/coverage: Move coverage #if guard back to top of file.
8 years ago
Rami Ali
50e14ca619
tests/import: Improve builtinimport.c test coverage.
8 years ago
Rami Ali
8d01bd3a1c
tests: Improve stream.c test coverage.
8 years ago
Pavol Rusnak
b82fc8dcef
stmhal: fix wrong usage of gcc -print-libgcc-file-name
8 years ago
Dave Hylands
aa53496391
stmhal: Support PortG on STM32L476 and STM32L486.
8 years ago
Oleg Korsak
e45035db5c
extmod/modframebuf: optimize fill_rect subroutine call
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
Damien George
5653e3c72f
docs: Bump version to 1.8.7.
8 years ago
Damien George
a722ed532f
tests/unix/extra_coverage: Add tests for importing frozen packages.
8 years ago
Damien George
b528e9a428
py/builtinimport: Fix bug when importing names from frozen packages.
The commit d9047d3c8a
introduced a bug
whereby "from a.b import c" stopped working for frozen packages. This is
because the path was not properly truncated and became "a//b". Such a
path resolves correctly for a "real" filesystem, but not for a search in
the list of frozen modules.
8 years ago
syndycat
b2611d6be3
drivers/onewire/ds18x20: Fix negative temperature calc for DS18B20.
8 years ago
Paul Sokolovsky
044f96c330
cc3200/modwlan: Add network.WLAN.print_ver() diagnostic function.
Prints NWP/MAC/PHY version, as affected by servicepack installed.
8 years ago
Paul Sokolovsky
a1a8f01799
docs/usocket: Clarify that socket timeout raises OSError exception.
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
Damien George
36ec5c8f27
docs/library/esp: Remove para and add further warning about flash.
There is no longer space reserved by default for native code.
8 years ago
Damien George
e343bea6e7
esp8266/modules/flashbdev: Change RESERVED_SECS to 0.
This effectively reverts the change that introduced this new constant.
The reason is so that users do not need to rebuild the filesystem on
their modules when upgrading the firmware.
Users can change RESERVED_SECS by hand if they need the feature, and in
future firmware it may default to a non-zero value.
8 years ago
Damien George
cc7e48fdc8
esp8266/modules/flashbdev: Remove now-unused function set_bl_flash_size.
8 years ago
Paul Sokolovsky
4a72294d7d
esp8266/modules/flashbdev: Remove code to patch bootloader flash size.
This code is no longer pertinent for some time - since switchover to
SDK2.0, there must be correct flash size set for bootloader, or there's
a risk of flash data corruption. And indeed, the correct flash size is
by default auto-detected by esptool.py 1.2.
8 years ago
Damien George
5d0d61586c
unix/Makefile: Allow cache-map-lookup optimisation with frozen bytecode.
8 years ago
Damien George
98458a46ec
tools/mpy-tool.py: Add support for OPT_CACHE_MAP_LOOKUP_IN_BYTECODE.
With caching of map lookups in the bytecode, frozen bytecode can still
work but must be stored in RAM, not ROM. This patch allows mpy-tool.py to
generate code that works with this optimisation, but it's not recommended
to use it on embedded targets (because of lack of RAM).
8 years ago
Damien George
343b4189b0
py/mkrules.mk: Add MPY_CROSS_FLAGS option to pass flags to mpy-cross.
So that ports can pass their own custom options to mpy-cross.
8 years ago
Damien George
8d1c236a1f
tests/unix/extra_coverage: Add basic tests to import frozen str and mpy.
8 years ago
Damien George
1551309575
unix: Enable and add basic frozen str and frozen mpy in coverage build.
8 years ago
Damien George
ea00151ffa
unix/Makefile: Split long line for coverage target, easier to modify.
8 years ago
Rami Ali
d7e168428b
tests/unix: Improve formatfloat.c test coverage using C.
8 years ago