Damien George
25afc7da0d
tests: Add tests to improve coverage of objstr.c.
9 years ago
Paul Sokolovsky
354d17523f
modmachine: Implement physical memory access using /dev/mem (Linux, etc).
This requires root access. And on recent Linux kernels, with
CONFIG_STRICT_DEVMEM option enabled, only address ranges listed in
/proc/iomem can be accessed. The above compiled-time option can be
however overriden with boot-time option "iomem=relaxed".
This also removed separate read/write paths - there unlikely would
be a case when they're different.
9 years ago
Damien George
68e8b595de
tests: Catch ValueError instead of any exception to properly test error.
9 years ago
Galen Hazelwood
616986a5f3
extmod: Add a2b_base64 and b2a_base64 functions to ubinascii.
9 years ago
Damien George
e44c1d3ace
tests: Split out json float tests to separate files.
10 years ago
Damien George
f6518a7bd5
tests: Check that machine module exists and print SKIP if it doesn't.
10 years ago
Paul Sokolovsky
1679696612
moductypes: Swap address and descriptor args in constructor.
Now address comes first, and args related to struct type are groupped next.
Besides clear groupping, should help catch errors eagerly (e.g. forgetting
to pass address will error out).
Also, improve args number checking/reporting overall.
10 years ago
Dave Hylands
3ad94d6072
extmod: Add ubinascii.unhexlify
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
10 years ago
Damien George
0589c19d52
tests: Add test for machine module (mem* functions).
10 years ago
Damien George
e5c4362a98
tests: Add some more tests to improve code coverage of corner cases.
10 years ago
Damien George
f256cfef4f
tests: Add some more tests for complex numbers and ure module.
10 years ago
Damien George
26a9975fba
tests: Add some more tests for bytes, bignum, string and ujson.
10 years ago
Damien George
c832bde05f
tests: Add zlib test for decompressing uncompressed data.
10 years ago
Damien George
55278dcc76
tests: Add test for modure when regex has errors.
10 years ago
Damien George
6cb6947b99
extmod/ure: Correctly return None when a group has no match.
See issue #1122 .
10 years ago
Damien George
2af921fb51
tests: Add tests for op special meths, ubinascii, complex.
10 years ago
Damien George
4e3906d6b5
tests: Add tests for ure groups and named char classes.
Issue #1122 should now be fixed.
10 years ago
Damien George
5f64dc55d8
extmod: Make ujson.loads raise exception if given empty string.
Addresses issue #1097 .
10 years ago
Paul Sokolovsky
2324f3ef29
moduzlib: Implement raw DEFLATE decoding support.
10 years ago
Paul Sokolovsky
444331c07f
modujson: .loads(): Handle more whitespace characters.
10 years ago
Paul Sokolovsky
c8b0229bc7
tests: sha256: skip test if uhashlib module is not available.
10 years ago
Paul Sokolovsky
4a1c80c293
tests: Add test for hashlib.sha256 .
10 years ago
Paul Sokolovsky
66d08eb4fe
moductypes: Add test for accessing UINT8 array.
10 years ago
Paul Sokolovsky
2559e13957
moductypes: Make sure we can apply .sizeof() to all aggregate types.
Before, sizeof() could be applied to a structure field only if that field
was itself a structure. Now it can be applied to PTR and ARRAY fields too.
It's not possible to apply it to scalar fields though, because as soon as
scalar field (int or float) is dereferenced, its value is converted into
Python int/float value, and all original type info is lost. Moreover, we
allow sizeof of type definitions too, and there int is used to represent
(scalar) types. So, we have ambiguity what int may be - either dereferenced
scalar structure field, or encoded scalar type. So, rather throw an error
if user tries to apply sizeof() to int.
10 years ago
Damien George
f5d69794a8
extmod: Add uheapq module.
10 years ago
Paul Sokolovsky
297d8469b8
modure: Update to re1.5 v0.6.1, fixed and extended character class support.
10 years ago
Paul Sokolovsky
95908b0f50
modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).
10 years ago
Paul Sokolovsky
34162872b1
moduzlib: Integrate into the system.
10 years ago
Paul Sokolovsky
f7bcce0552
modure: Basic tests.
10 years ago
Paul Sokolovsky
9aeec0e3a3
tests: Add missing "import sys".
10 years ago
Damien George
f53c343363
tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh.
10 years ago
Damien George
c3ab90da46
tests: Make printing of floats hopefully more portable.
10 years ago
Damien George
cde0ca21bf
py: Simplify JSON str printing (while still conforming to JSON spec).
The JSON specs are relatively flexible and allow us to use one function
to print strings, be they ascii, bytes or utf-8 encoded.
10 years ago
Damien George
96e20c600f
tests: Fix uctypes tests to run on 64bit arch; enable more native tests.
10 years ago
Damien George
2c180f7ccc
extmod, ujson: Add test and comment for loads.
10 years ago
Damien George
612045f53f
py: Add native json printing using existing print framework.
Also add start of ujson module with dumps implemented. Enabled in unix
and stmhal ports. Test passes on both.
10 years ago
Damien George
1ddd844815
extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.
10 years ago
Paul Sokolovsky
5073d3da07
tests: Add test for zlibd module.
10 years ago
Paul Sokolovsky
2097c8b1e1
moductypes: Add symbolic constants to specify bitfield position/length.
10 years ago
Paul Sokolovsky
8215847b4d
moductypes: Foreign data interface module, roughly based on ctype ideas.
But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
11 years ago