tests: Fix tests to use sys.implementation._mpy.
The field was renamed to _mpy in 59c5d41611
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
e3c880a569
commit
8aa254c369
|
@ -22,8 +22,8 @@ except AttributeError:
|
|||
# Effectively skip subtests
|
||||
print(True)
|
||||
|
||||
if hasattr(sys.implementation, 'mpy'):
|
||||
print(type(sys.implementation.mpy))
|
||||
if hasattr(sys.implementation, '_mpy'):
|
||||
print(type(sys.implementation._mpy))
|
||||
else:
|
||||
# Effectively skip subtests
|
||||
print(int)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
try:
|
||||
import gc, sys, uio, uos
|
||||
|
||||
sys.implementation.mpy
|
||||
sys.implementation._mpy
|
||||
uio.IOBase
|
||||
uos.mount
|
||||
except (ImportError, AttributeError):
|
||||
|
@ -46,7 +46,7 @@ class UserFS:
|
|||
|
||||
|
||||
# Pre-compiled examples/natmod/features0 example for various architectures, keyed
|
||||
# by the required value of sys.implementation.mpy.
|
||||
# by the required value of sys.implementation._mpy.
|
||||
features0_file_contents = {
|
||||
# -march=x64
|
||||
0xA06: b'M\x06\n\x1f\x01\x004build/features0.native.mpy\x00\x8aB\xe9/\x00\x00\x00SH\x8b\x1d\x83\x00\x00\x00\xbe\x02\x00\x00\x00\xffS\x18\xbf\x01\x00\x00\x00H\x85\xc0u\x0cH\x8bC \xbe\x02\x00\x00\x00[\xff\xe0H\x0f\xaf\xf8H\xff\xc8\xeb\xe6ATUSH\x8b\x1dQ\x00\x00\x00H\x8bG\x08L\x8bc(H\x8bx\x08A\xff\xd4H\x8d5+\x00\x00\x00H\x89\xc5H\x8b\x059\x00\x00\x00\x0f\xb78\xffShH\x89\xefA\xff\xd4H\x8b\x03[]A\\\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x85\x00\x12factorial\x00\x10\r$\x01&\x9f \x01"\xff',
|
||||
|
@ -58,12 +58,12 @@ features0_file_contents = {
|
|||
for arch in (0x1A06, 0x1E06, 0x2206):
|
||||
features0_file_contents[arch] = features0_file_contents[0x1606]
|
||||
|
||||
if sys.implementation.mpy not in features0_file_contents:
|
||||
if sys.implementation._mpy not in features0_file_contents:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
# These are the test .mpy files.
|
||||
user_files = {"/features0.mpy": features0_file_contents[sys.implementation.mpy]}
|
||||
user_files = {"/features0.mpy": features0_file_contents[sys.implementation._mpy]}
|
||||
|
||||
# Create and mount a user filesystem.
|
||||
uos.mount(UserFS(user_files), "/userfs")
|
||||
|
|
Loading…
Reference in New Issue