mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
compare singletons by identity not equality (closes #16712)
Patch from Serhiy Storchaka.
This commit is contained in:
parent
a511935151
commit
b29614e047
9 changed files with 15 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue