From f4b5c7584e8f2bb4617c547e7ea560c8e86aaba3 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 22 Jan 2023 20:32:17 -0700 Subject: [PATCH] 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 e833c7ed..55c40191 100644 --- a/tests/test_wasyncore.py +++ b/tests/test_wasyncore.py @@ -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")