summaryrefslogtreecommitdiffstatshomepage
path: root/tests/ports/unix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ports/unix')
-rw-r--r--tests/ports/unix/extra_coverage.py10
-rw-r--r--tests/ports/unix/extra_coverage.py.exp12
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/ports/unix/extra_coverage.py b/tests/ports/unix/extra_coverage.py
index ec68a55508..72f5fe56b3 100644
--- a/tests/ports/unix/extra_coverage.py
+++ b/tests/ports/unix/extra_coverage.py
@@ -6,6 +6,16 @@ except NameError:
import errno
import io
+import uctypes
+
+# create an int-like variable used for coverage of `mp_obj_get_ll`
+buf = bytearray(b"\xde\xad\xbe\xef")
+struct = uctypes.struct(
+ uctypes.addressof(buf),
+ {"f32": uctypes.UINT32 | 0},
+ uctypes.BIG_ENDIAN,
+)
+deadbeef = struct.f32
data = extra_coverage()
diff --git a/tests/ports/unix/extra_coverage.py.exp b/tests/ports/unix/extra_coverage.py.exp
index ac64edde69..00658ab3ad 100644
--- a/tests/ports/unix/extra_coverage.py.exp
+++ b/tests/ports/unix/extra_coverage.py.exp
@@ -69,8 +69,8 @@ argv atexit byteorder exc_info
executable exit getsizeof implementation
intern maxsize modules path
platform print_exception ps1
-ps2 stderr stdin stdout
-tracebacklimit version version_info
+ps2 settrace stderr stdin
+stdout tracebacklimit version version_info
ementation
# attrtuple
(start=1, stop=2, step=3)
@@ -94,6 +94,12 @@ data
1
0
0.000000
+deadbeef
+c0ffee777c0ffee
+deadbeef
+0deadbeef
+c0ffee
+000c0ffee
# runtime utils
TypeError: unsupported type for __abs__: 'str'
TypeError: unsupported types for __divmod__: 'str', 'str'
@@ -102,6 +108,8 @@ TypeError: unsupported types for __divmod__: 'str', 'str'
2
OverflowError: overflow converting long int to machine word
OverflowError: overflow converting long int to machine word
+TypeError: can't convert NoneType to int
+TypeError: can't convert NoneType to int
ValueError:
Warning: test
# format float