summaryrefslogtreecommitdiff
path: root/tests/micropython
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython')
-rw-r--r--tests/micropython/import_mpy_native.py4
-rw-r--r--tests/micropython/import_mpy_native_gc.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/micropython/import_mpy_native.py b/tests/micropython/import_mpy_native.py
index 7a9bb8edd..b7908b5a6 100644
--- a/tests/micropython/import_mpy_native.py
+++ b/tests/micropython/import_mpy_native.py
@@ -54,11 +54,11 @@ class UserFS:
# these are the test .mpy files
small_int_bits = 30
-valid_header = bytes([77, 6, mpy_arch, small_int_bits])
+valid_header = bytes([77, 6, (mpy_arch & 0x3F), small_int_bits])
# fmt: off
user_files = {
# bad architecture (mpy_arch needed for sub-version)
- '/mod0.mpy': bytes([77, 6, 0xfc | mpy_arch, small_int_bits]),
+ '/mod0.mpy': bytes([77, 6, 0xfc | (mpy_arch & 3), small_int_bits]),
# test loading of viper and asm
'/mod1.mpy': valid_header + (
diff --git a/tests/micropython/import_mpy_native_gc.py b/tests/micropython/import_mpy_native_gc.py
index 851eb3922..997e052fd 100644
--- a/tests/micropython/import_mpy_native_gc.py
+++ b/tests/micropython/import_mpy_native_gc.py
@@ -67,7 +67,7 @@ for arch in (0x1406, 0x1806, 0x1C06, 0x2006):
features0_file_contents[arch] = features0_file_contents[0x1006]
# Check that a .mpy exists for the target (ignore sub-version in lookup).
-sys_implementation_mpy = sys.implementation._mpy & ~(3 << 8)
+sys_implementation_mpy = (sys.implementation._mpy & ~(3 << 8)) & 0xFFFF
if sys_implementation_mpy not in features0_file_contents:
print("SKIP")
raise SystemExit