From f4b5c7584e8f2bb4617c547e7ea560c8e86aaba3 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 22 Jan 2023 20:32:17 -0700 Subject: Fix testing of strerror to use actual valid errno/strerror to compare Closes #395 --- tests/test_wasyncore.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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") -- cgit v1.2.1