Commit Graph

137 Commits

Author SHA1 Message Date
Peter Hinch
468c6f9da1 extmod/modframebuf: Make monochrome bitmap formats start with MONO_.
MONO_xxx is much easier to read if you're not familiar with the code.
MVLSB is deprecated but kept for backwards compatibility, for the time
being.

This patch also updates the associated docs and tests.
2017-04-04 17:38:33 +10:00
Paul Sokolovsky
499ea8b253 tests/extmod/vfs_fat_fileio*: Improve skippability.
Should be skipped on missing uso, uerrno modules.
2017-04-03 00:14:57 +03:00
Paul Sokolovsky
b9e9cfcfc1 tests: vfs_fat_fileio.py is too big to be parsed in 16K heap, split in 2.
This restores ability to run testsuite with 16K heap.
2017-04-02 22:02:11 +03:00
Peter Hinch
231cfc84a7 extmod/modframebuf: Add support for monochrome horizontal format.
MHLSB and MHMSB formats are added to the framebuf module, which have 8
adjacent horizontal pixels represented in a single byte.
2017-03-20 16:21:47 +11:00
Rami Ali
8a57cacd78 tests/extmod: Improve tinfgzip.c test coverage. 2017-03-14 22:13:36 +11:00
Damien George
a49a96bb5d tests/extmod/vfs_basic: Unmount all existing devices before doing test.
This is so the test can run successfully on targets that already have
something mounted.
2017-03-14 22:08:37 +11:00
Rami Ali
4e86ca398f tests/extmod: Improve re1.5/recursiveloop.c test coverage. 2017-03-14 17:17:45 +11:00
Damien George
773b0bac41 tests/extmod/vfs_basic: Add more tests for basic VFS functionality. 2017-03-14 16:07:30 +11:00
Damien George
8891b2e700 tests/extmod: Add a test for core VFS functionality, sans any filesystem. 2017-03-13 21:42:02 +11:00
Damien George
f07a56fa3b tests/extmod: Rename websocket test to websocket_basic.
This is so that the filename of the test doesn't clash with the module name
itself (being "websocket"), and lead to potential problems executing the
test.
2017-03-10 15:05:08 +11:00
Alex March
ce0b5e078b tests/extmod: Add websocket tests.
These short unit tests test the base uPy methods as well as parts of the
websocket protocol, as implemented by uPy.

@dpgeorge converted the original socket based tests by @hosaka to ones
that only require io.BytesIO.
2017-03-09 16:47:41 +11:00
Damien George
38f063ea72 tests/extmod: Add very basic feature test for ussl module.
This test just tests that the basic functions/methods can be called with
the appropriate arguments.  There is no real test of underlying
functionality.

Thanks to @hosaka for the initial implementation of this test.
2017-03-09 13:42:34 +11:00
Paul Sokolovsky
bdd48e67ee tests/uctypes_array_assign_native_le: Split off intbig part. 2017-03-07 08:40:03 +01:00
Damien George
ecc635d551 tests/extmod: Add test for machine.Signal class. 2017-03-02 16:09:16 +11:00
Paul Sokolovsky
f2d732f459 tests/extmod: Make tests skippable. 2017-02-15 01:56:22 +03:00
Paul Sokolovsky
d5e9ab6e61 extmod/machine_pulse: Make time_pulse_us() not throw exceptions.
machine.time_pulse_us() is intended to provide very fine timing, including
while working with signal bursts, where each transition is tracked in row.
Throwing and handling an exception may take too much time and "signal loss".
So instead, in case of a timeout, just return negative value. Cases of
timeout while waiting for initial signal stabilization, and during actual
timing, are recognized.

The documentation is updated accordingly, and rewritten somewhat to clarify
the function behavior.
2017-02-05 14:20:17 +03:00
Damien George
a0c729681f tests/extmod/vfs_fat_ramdisk: Make it work on pyboard. 2017-01-27 23:22:15 +11:00
Damien George
b9bfaa349a tests/extmod/vfs_fat: Update tests to work with new VFS sub-system.
The vfs_fat_fsusermount test is no longer relevant so has been removed.
2017-01-27 17:21:45 +11:00
Damien George
94d87fbb30 test/extmod: Update vfs_fat tests for new OO FatFs library.
The new version of FatFs requires a minimum of 50 blocks on the device.
Also, some tests no longer make sense with an OO vfs.
2017-01-27 13:19:10 +11:00
Damien George
221f88d1f3 tests/extmod: Add test for ure debug printing when compiling a regex. 2017-01-26 23:45:51 +11:00
Damien George
bf51200bc1 tests/extmod/framebuf1: Fix test for framebuf invalid constructor. 2017-01-25 23:23:50 +11:00
Oleg Korsak
406fb3cb60 tests/extmod/framebuf4: Add tests for GS4_HMSB framebuf format. 2017-01-25 23:20:19 +11:00
Oleg Korsak
fd99690f18 extmod/modframebuf: Add GS4_HMSB format. 2017-01-25 23:19:28 +11:00
Damien George
4c4f586e2c tests/extmod/framebuf1: Add test for no-op fill_rect. 2017-01-19 23:37:44 +11:00
Rami Ali
5e80c53c11 tests/extmod: Improve test coverage of ure module. 2017-01-17 17:42:37 +11:00
Rami Ali
c15ebf7c8c tests/extmod: Improve ubinascii.c test coverage. 2016-12-29 13:22:19 +11:00
Paul Sokolovsky
492c612f9d tests/utimeq_stable: Test for partial stability of utimeq queuing. 2016-12-24 00:25:15 +03:00
Paul Sokolovsky
ffe807f349 extmod/moduheapq: Revert change for adhoc relative-time queue support.
Now that specialized utimeq module has been implenented, revert previous
adhoc changes to uheapq.

This reverts commit 0cbc07227c.
2016-12-22 06:37:49 +03:00
Paul Sokolovsky
5d9025a76e tests/extmod: Add test for utimeq module. 2016-12-22 00:31:38 +03:00
Rami Ali
9112b0b62b tests/extmod: Improve modframebuf test coverage. 2016-12-13 16:29:21 +11:00
Rami Ali
d22762017e tests/extmod: Improve moductypes test coverage. 2016-12-12 17:09:14 +11:00
Paul Sokolovsky
aee13ef3f2 tests: Update for required byteorder arg for int.from_bytes()/to_bytes(). 2016-12-09 22:53:30 +03:00
Damien George
898d4c1217 extmod/modframebuf: Make framebuf implement the buffer protocol.
So that one can easily access the underlying data of the frame buffer, eg
to write the data out to a display.
2016-12-08 15:17:47 +11:00
Damien George
042d5f24d6 tests/extmod/framebuf1: Add basics tests for hline, vline, rect, line. 2016-12-05 11:55:43 +11:00
Paul Sokolovsky
e44b236ce2 tests/extmod/btree1: Exercise btree.flush(). 2016-12-05 01:55:05 +03:00
Damien George
6194336d81 tests/extmod/vfs_fat_fileio: Add test for constructor of FileIO type. 2016-12-02 15:37:58 +11:00
Damien George
b7df3e541a extmod/vfs_fat: Implement POSIX behaviour of rename, allow to overwrite.
If the destination of os.rename() exists then it will be overwritten if it
is a file.  This is the POSIX behaviour, which is also the CPython
behaviour, and so we follow suit.

See issue #2598 for discussion.
2016-12-02 15:06:09 +11:00
Damien George
81e171b7bb extmod/modframebuf: Add back legacy FrameBuffer1 "class".
For backwards compatibility.  It simple creates a frame buffer with the
MVLSB format.
2016-12-01 16:43:25 +11:00
Radomir Dopieralski
225e22b287 extmod/modframebuf: Make FrameBuffer handle 16bit depth.
Rename FrameBuffer1 into FrameBuffer and make it handle different bit
depths via a method table that has getpixel and setpixel.  Currently
supported formats are MVLSB (monochrome, vertical, LSB) and RGB565.

Also add blit() and fill_rect() methods.
2016-12-01 16:43:25 +11:00
Rami Ali
1b41cacac7 tests/extmod: Improve ujson coverage. 2016-11-22 15:48:42 +11:00
Paul Sokolovsky
0cbc07227c extmod/moduheapq: Adhoc changes to support ordering by utime.ticks_ms().
As required for further elaboration of uasyncio, like supporting baremetal
systems with wraparound timesources. This is not intended to be public
interface, and likely will be further refactored in the future.
2016-11-12 02:33:17 +03:00
Paul Sokolovsky
fa3a108ed7 tests/vfs_fat_oldproto: Skip for ports not supporting "oldproto".
Otherwise this broke esp8266 testsuite.
2016-11-06 01:47:44 +03:00
Alex March
94aeba0427 tests/extmod/framebuf1: Test framebuffer pixel clear, and text function. 2016-11-03 00:10:17 +11:00
Paul Sokolovsky
be6a765c69 tests/extmod/ticks_diff: Test for new semantics of ticks_diff(). 2016-10-30 21:33:12 +03:00
Paul Sokolovsky
1ba4db5685 tests/btree1: Fix out of memory error running on esp8266. 2016-10-29 19:53:31 +03:00
Alex March
cc0cc67815 tests/extmod/uhashlib_sha256: Rename sha256.py test. 2016-10-28 19:51:54 +03:00
Alex March
b83ac44e82 tests/extmod/uhashlib_sha1: Coverage for SHA1 algorithm. 2016-10-28 19:51:46 +03:00
Alex March
fbca4f94b3 tests/extmod/vfs_fat_oldproto: Test old block device protocol. 2016-10-27 12:22:43 +11:00
Alex March
38a9359339 tests/extmod/vfs_fat_fsusermount: Improve fsusermount test coverage. 2016-10-27 12:22:42 +11:00
Damien George
5694201930 extmod/vfs_fat_file: Make file.close() a no-op if file already closed.
As per CPython semantics.  In particular, file.__del__() should not raise
an exception if the file is already closed.
2016-10-24 12:59:20 +11:00