diff options
author | Bert JW Regeer <bertjw@regeer.org> | 2023-01-22 20:41:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 20:41:53 -0700 |
commit | 56e44fec0931ea6726a28fab96607f829854a219 (patch) | |
tree | d637d73bc5b61c045e3887e77fa81cee7a547dcb /tests | |
parent | 3e440716e15160c8ff11617f554631e18aec47c9 (diff) | |
parent | f4b5c7584e8f2bb4617c547e7ea560c8e86aaba3 (diff) | |
download | waitress-56e44fec0931ea6726a28fab96607f829854a219.tar.gz |
Merge pull request #397 from Pylons/bugfix/test-gardenpath
Fix testing of strerror to use actual valid errno/strerror to compare
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_wasyncore.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_wasyncore.py b/tests/test_wasyncore.py index e833c7e..55c4019 100644 --- a/tests/test_wasyncore.py +++ b/tests/test_wasyncore.py @@ -1196,7 +1196,10 @@ class Test__strerror(unittest.TestCase): 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") |