mirror of
https://github.com/python/cpython.git
synced 2025-11-15 00:00:00 +00:00
os.popen().close() returns None on success, not 0...
This commit is contained in:
commit
360b3c21f5
1 changed files with 2 additions and 2 deletions
|
|
@ -630,7 +630,7 @@ class PosixTester(unittest.TestCase):
|
||||||
groups = idg.read().strip()
|
groups = idg.read().strip()
|
||||||
ret = idg.close()
|
ret = idg.close()
|
||||||
|
|
||||||
if ret != 0 or not groups:
|
if ret != None or not groups:
|
||||||
raise unittest.SkipTest("need working 'id -G'")
|
raise unittest.SkipTest("need working 'id -G'")
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
|
@ -644,7 +644,7 @@ class PosixTester(unittest.TestCase):
|
||||||
groups = idg.read().strip()
|
groups = idg.read().strip()
|
||||||
ret = idg.close()
|
ret = idg.close()
|
||||||
|
|
||||||
if ret != 0 or not groups:
|
if ret != None or not groups:
|
||||||
raise unittest.SkipTest("need working 'id -G'")
|
raise unittest.SkipTest("need working 'id -G'")
|
||||||
|
|
||||||
# 'id -G' and 'os.getgroups()' should return the same
|
# 'id -G' and 'os.getgroups()' should return the same
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue