Update errno tests to match new expected behavior

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
This commit is contained in:
Matt Wozniski 2018-05-14 22:55:21 -04:00
parent 5833cbe6de
commit 086bffb594
2 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,10 @@ print(type(uerrno.EIO))
# check that errors are rendered in a nice way # check that errors are rendered in a nice way
msg = str(OSError(uerrno.EIO)) msg = str(OSError(uerrno.EIO))
print(msg[:7], msg[-5:]) print(msg[:7], msg[msg.find(']'):])
msg = str(OSError(uerrno.ENOBUFS))
print(msg[:7], msg[msg.find(']'):])
# check that unknown errno is still rendered # check that unknown errno is still rendered
print(str(OSError(9999))) print(str(OSError(9999)))

View File

@ -1,3 +1,4 @@
<class 'int'> <class 'int'>
[Errno ] EIO [Errno ] Input/output error
[Errno ] ENOBUFS
9999 9999