Skip to content

Commit

Permalink
Merge pull request #397 from Pylons/bugfix/test-gardenpath
Browse files Browse the repository at this point in the history
Fix testing of strerror to use actual valid errno/strerror to compare
  • Loading branch information
digitalresistor authored Jan 23, 2023
2 parents 3e44071 + f4b5c75 commit 56e44fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_wasyncore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,10 @@ def _callFUT(self, err):
return _strerror(err)

def test_gardenpath(self):
self.assertEqual(self._callFUT(1), "Operation not permitted")
from errno import EINVAL
from os import strerror

self.assertEqual(self._callFUT(EINVAL), strerror(EINVAL))

def test_unknown(self):
self.assertEqual(self._callFUT("wut"), "Unknown error wut")
Expand Down

0 comments on commit 56e44fe

Please sign in to comment.