Skip to content

Commit

Permalink
Fix testing of strerror to use actual valid errno/strerror to compare
Browse files Browse the repository at this point in the history
Closes #395
  • Loading branch information
digitalresistor committed Jan 23, 2023
1 parent 3e44071 commit 76c258c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_wasyncore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,9 @@ 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 76c258c

Please # to comment.