summaryrefslogtreecommitdiff
path: root/tests/unix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unix')
-rw-r--r--tests/unix/extra_coverage.py10
-rw-r--r--tests/unix/extra_coverage.py.exp24
-rw-r--r--tests/unix/ffi_types.py6
-rw-r--r--tests/unix/time_mktime_localtime.py (renamed from tests/unix/time.py)5
4 files changed, 21 insertions, 24 deletions
diff --git a/tests/unix/extra_coverage.py b/tests/unix/extra_coverage.py
index 3c12b2692..0ea8f7886 100644
--- a/tests/unix/extra_coverage.py
+++ b/tests/unix/extra_coverage.py
@@ -4,8 +4,8 @@ except NameError:
print("SKIP")
raise SystemExit
-import uerrno
-import uio
+import errno
+import io
data = extra_coverage()
@@ -18,7 +18,7 @@ print(hash(str(data[1], "utf8")))
# test streams
stream = data[2] # has set_error and set_buf. Write always returns error
-stream.set_error(uerrno.EAGAIN) # non-blocking error
+stream.set_error(errno.EAGAIN) # non-blocking error
print(stream.read()) # read all encounters non-blocking error
print(stream.read(1)) # read 1 byte encounters non-blocking error
print(stream.readline()) # readline encounters non-blocking error
@@ -42,8 +42,8 @@ stream2 = data[3] # is textio
print(stream2.read(1)) # read 1 byte encounters non-blocking error with textio stream
# test BufferedWriter with stream errors
-stream.set_error(uerrno.EAGAIN)
-buf = uio.BufferedWriter(stream, 8)
+stream.set_error(errno.EAGAIN)
+buf = io.BufferedWriter(stream, 8)
print(buf.write(bytearray(16)))
# function defined in C++ code
diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp
index 7ea2599c9..6ec8eaaa0 100644
--- a/tests/unix/extra_coverage.py.exp
+++ b/tests/unix/extra_coverage.py.exp
@@ -48,21 +48,21 @@ RuntimeError:
RuntimeError:
# repl
ame__
-mport
+port
builtins micropython _thread _uasyncio
-btree cexample cmath cppexample
-example_package ffi framebuf
-gc math termios uarray
-ubinascii ucollections ucryptolib uctypes
-uerrno uhashlib uheapq uio
-ujson umachine uos urandom
-ure uselect usocket ussl
-ustruct usys utime utimeq
-uwebsocket uzlib
-ime
+array binascii btree cexample
+cmath collections cppexample cryptolib
+errno example_package ffi
+framebuf gc hashlib heapq
+io json machine math
+os random re select
+socket ssl struct sys
+termios time timeq uctypes
+websocket zlib
+me
-utime utimeq
+time timeq
argv atexit byteorder exc_info
executable exit getsizeof implementation
diff --git a/tests/unix/ffi_types.py b/tests/unix/ffi_types.py
index fd94c509d..06e9b89d3 100644
--- a/tests/unix/ffi_types.py
+++ b/tests/unix/ffi_types.py
@@ -1,7 +1,7 @@
# test 8/16/32/64 bit signed/unsigned integer arguments and return types for ffi functions
# requires ffi_lib.c to be compiled as: $(CC) -shared -o ffi_lib.so ffi_lib.c
-import uos, usys
+import os, sys
try:
import ffi
@@ -9,9 +9,9 @@ except ImportError:
print("SKIP")
raise SystemExit
-ffi_lib_filename = "./" + usys.argv[0].rsplit("/", 1)[0] + "/ffi_lib.so"
+ffi_lib_filename = "./" + sys.argv[0].rsplit("/", 1)[0] + "/ffi_lib.so"
try:
- uos.stat(ffi_lib_filename)
+ os.stat(ffi_lib_filename)
except OSError:
print("SKIP")
raise SystemExit
diff --git a/tests/unix/time.py b/tests/unix/time_mktime_localtime.py
index 55a4b18aa..d1c03c103 100644
--- a/tests/unix/time.py
+++ b/tests/unix/time_mktime_localtime.py
@@ -1,7 +1,4 @@
-try:
- import utime as time
-except ImportError:
- import time
+import time
DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]