]> granicus.if.org Git - python/commitdiff
A raise of unittest.SkipTest leaked through in the backport for issue7900,
authorRonald Oussoren <ronaldoussoren@mac.com>
Sun, 1 Aug 2010 18:46:05 +0000 (18:46 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Sun, 1 Aug 2010 18:46:05 +0000 (18:46 +0000)
and that causes test failes on some platforms.

Lib/test/test_posix.py

index 4c0d53ac05a8c3851dd0b4c46bebfe4809c15a70..195df2654c4b45c1eea579afad73c410ebcaedd1 100644 (file)
@@ -308,11 +308,12 @@ class PosixTester(unittest.TestCase):
                 shutil.rmtree(base_path)
 
     def test_getgroups(self):
-        with os.popen('id -G') as idg:
+        with os.popen('id -G 2>/dev/null') as idg:
             groups = idg.read().strip()
 
         if not groups:
-            raise unittest.SkipTest("need working 'id -G'")
+            # This test needs 'id -G'
+            return
 
         # The order of groups isn't important, hence the calls
         # to sorted.