]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-32033: Fix test_pwd failures on Android (GH-19502)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 14 Apr 2020 18:31:00 +0000 (11:31 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2020 18:31:00 +0000 (11:31 -0700)
(cherry picked from commit 96515e9f6785328c52ebc5d4ce60e0087a9adc2d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Lib/test/test_pwd.py

index c13a7c9294f983d2ecd3037cf8f1803370172cbe..85740cecd82294596b05ab5544415e0cbf1ba8db 100644 (file)
@@ -21,7 +21,7 @@ class PwdTest(unittest.TestCase):
             self.assertEqual(e[3], e.pw_gid)
             self.assertIsInstance(e.pw_gid, int)
             self.assertEqual(e[4], e.pw_gecos)
-            self.assertIsInstance(e.pw_gecos, str)
+            self.assertIn(type(e.pw_gecos), (str, type(None)))
             self.assertEqual(e[5], e.pw_dir)
             self.assertIsInstance(e.pw_dir, str)
             self.assertEqual(e[6], e.pw_shell)