mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
tests/extmod: Improve skip detection of extmod tests.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -1,20 +1,18 @@
|
|||||||
# test "soft" machine.Timer (no hardware ID)
|
# test "soft" machine.Timer (no hardware ID)
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
if sys.platform in ("esp32", "esp8266"):
|
|
||||||
print("SKIP") # TODO: Implement soft timers for esp32/esp8266 ports
|
|
||||||
raise SystemExit
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import time, machine as machine
|
import time, machine
|
||||||
|
|
||||||
machine.Timer
|
machine.Timer
|
||||||
except:
|
except:
|
||||||
print("SKIP")
|
print("SKIP")
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
if sys.platform in ("esp32", "esp8266"):
|
||||||
|
print("SKIP") # TODO: Implement soft timers for esp32/esp8266 ports
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
# create and deinit
|
# create and deinit
|
||||||
t = machine.Timer(freq=1)
|
t = machine.Timer(freq=1)
|
||||||
t.deinit()
|
t.deinit()
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# Test custom pollable objects implemented in Python.
|
# Test custom pollable objects implemented in Python.
|
||||||
|
|
||||||
from micropython import const
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import socket, select, io
|
import socket, select, io
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("SKIP")
|
print("SKIP")
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
from micropython import const
|
||||||
|
|
||||||
_MP_STREAM_POLL = const(3)
|
_MP_STREAM_POLL = const(3)
|
||||||
_MP_STREAM_GET_FILENO = const(10)
|
_MP_STREAM_GET_FILENO = const(10)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Ensure that SSL sockets can be allocated from multiple
|
# Ensure that SSL sockets can be allocated from multiple
|
||||||
# threads without thread safety issues
|
# threads without thread safety issues
|
||||||
import unittest
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import _thread
|
import _thread
|
||||||
@@ -11,6 +10,8 @@ except ImportError:
|
|||||||
print("SKIP")
|
print("SKIP")
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
class TestSocket(io.IOBase):
|
class TestSocket(io.IOBase):
|
||||||
def write(self, buf):
|
def write(self, buf):
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Test ilistdir __del__ for VfsFat using a RAM device.
|
# Test ilistdir __del__ for VfsFat using a RAM device.
|
||||||
import gc
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import os, vfs
|
import gc, os, vfs
|
||||||
|
|
||||||
vfs.VfsFat
|
vfs.VfsFat
|
||||||
except (ImportError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Test ilistdir __del__ for VfsLittle using a RAM device.
|
# Test ilistdir __del__ for VfsLittle using a RAM device.
|
||||||
import gc
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import vfs
|
import gc, vfs
|
||||||
|
|
||||||
vfs.VfsLfs2
|
vfs.VfsLfs2
|
||||||
except (ImportError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# Test ilistdir __del__ for VfsPosix.
|
# Test ilistdir __del__ for VfsPosix.
|
||||||
import gc
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import os, vfs
|
import gc, os, vfs
|
||||||
|
|
||||||
vfs.VfsPosix
|
vfs.VfsPosix
|
||||||
except (ImportError, AttributeError):
|
except (ImportError, AttributeError):
|
||||||
|
|||||||
Reference in New Issue
Block a user