]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-34594: Don't hardcode errno values in the tests. (GH-9096)
authorZackery Spytz <zspytz@gmail.com>
Fri, 7 Sep 2018 16:17:08 +0000 (10:17 -0600)
committerBenjamin Peterson <benjamin@python.org>
Fri, 7 Sep 2018 16:17:08 +0000 (09:17 -0700)
(cherry picked from commit b03c2c51909e3b5b5966d86a2829b5ddf2d496aa)

Lib/test/test_spwd.py
Misc/NEWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst [new file with mode: 0644]

index e893f3a847fdf9032ca908f73a5c80adea0c045e..07793c84c8e912c5d09bff0e05884a8dc69a42f6 100644 (file)
@@ -67,8 +67,6 @@ class TestSpwdNonRoot(unittest.TestCase):
                 spwd.getspnam(name)
         except KeyError as exc:
             self.skipTest("spwd entry %r doesn't exist: %s" % (name, exc))
-        else:
-            self.assertEqual(str(cm.exception), '[Errno 13] Permission denied')
 
 
 if __name__ == "__main__":
diff --git a/Misc/NEWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst b/Misc/NEWS.d/next/Tests/2018-09-05-23-50-21.bpo-34594.tqL-GS.rst
new file mode 100644 (file)
index 0000000..c6026b0
--- /dev/null
@@ -0,0 +1 @@
+Fix usage of hardcoded ``errno`` values in the tests.
\ No newline at end of file