8000 Human readable OSError messages by godlygeek · Pull Request #837 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Human readable OSError messages #837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update errno tests to match new expected behavior
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
  • Loading branch information
godlygeek committed May 15, 2018
commit 086bffb5940eb0450b4213934c6c1ed12d124e7c
5 changes: 4 additions & 1 deletion tests/basics/errno1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@

# check that errors are rendered in a nice way
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
print(str(OSError(9999)))
3 changes: 2 additions & 1 deletion tests/basics/errno1.py.exp
4813
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<class 'int'>
[Errno ] EIO
[Errno ] Input/output error
[Errno ] ENOBUFS
9999
0