diff options
author | Dave Hylands <dhylands@gmail.com> | 2015-05-18 14:41:25 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-05-20 09:29:22 +0100 |
commit | 3ad94d6072555955a796c8c72a526c4fdff86711 (patch) | |
tree | c845f32926a12105b6929b422c3b66c55f098481 /tests | |
parent | 97ce883217c646a2d2bc9bf6bfce6e2eaa731dae (diff) | |
download | micropython-3ad94d6072555955a796c8c72a526c4fdff86711.tar.gz micropython-3ad94d6072555955a796c8c72a526c4fdff86711.zip |
extmod: Add ubinascii.unhexlify
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
Diffstat (limited to 'tests')
-rw-r--r-- | tests/extmod/ubinascii_unhexlify.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/extmod/ubinascii_unhexlify.py b/tests/extmod/ubinascii_unhexlify.py new file mode 100644 index 0000000000..1ec6972c5b --- /dev/null +++ b/tests/extmod/ubinascii_unhexlify.py @@ -0,0 +1,9 @@ +try: + import ubinascii as binascii +except ImportError: + import binascii + +print(binascii.unhexlify(b'0001020304050607')) +print(binascii.unhexlify(b'08090a0b0c0d0e0f')) +print(binascii.unhexlify(b'7f80ff')) +print(binascii.unhexlify(b'313233344142434461626364')) |