Skip to content

Commit 2b7c4a1

Browse files
committed
tests/basics: Add errno1 test, to check basics of uerrno module.
1 parent 67a4813 commit 2b7c4a1

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

tests/basics/errno1.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# test errno's and uerrno module
2+
3+
try:
4+
import uerrno
5+
except ImportError:
6+
print("SKIP")
7+
import sys
8+
sys.exit()
9+
10+
# check that constants exist and are integers
11+
print(type(uerrno.EIO))
12+
13+
# check that errors are rendered in a nice way
14+
msg = str(OSError(uerrno.EIO))
15+
print(msg[:7], msg[-5:])

tests/basics/errno1.py.exp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<class 'int'>
2+
[Errno ] EIO

0 commit comments

Comments
 (0)