compare singletons by identity not equality (closes #16712)

Patch from Serhiy Storchaka.
This commit is contained in:
Benjamin Peterson 2012-10-09 11:16:03 -04:00
parent a511935151
commit b29614e047
9 changed files with 15 additions and 15 deletions

View file

@ -651,7 +651,7 @@ class PosixTester(unittest.TestCase):
groups = idg.read().strip()
ret = idg.close()
if ret != None or not groups:
if ret is not None or not groups:
raise unittest.SkipTest("need working 'id -G'")
self.assertEqual(
@ -665,7 +665,7 @@ class PosixTester(unittest.TestCase):
groups = idg.read().strip()
ret = idg.close()
if ret != None or not groups:
if ret is not None or not groups:
raise unittest.SkipTest("need working 'id -G'")
# 'id -G' and 'os.getgroups()' should return the same