Commits

Brian Kearns  committed b1014f8

fix this test a bit more strictly

  • Participants
  • Parent commits c151e83

Comments (0)

Files changed (1)

File pypy/module/test_lib_pypy/test_grp_extra.py

 
     def test_basic(self):
         raises(KeyError, self.grp.getgrnam, "dEkLofcG")
-        try:
-            g = self.grp.getgrnam("root")
-        except KeyError:
-            return     # no 'root' group on OS/X?
-        assert g.gr_gid == 0
-        assert g.gr_mem == ['root'] or g.gr_mem == []
-        assert g.gr_name == 'root'
-        assert isinstance(g.gr_passwd, str)    # usually just 'x', don't hope :-)
+        for name in ["root", "wheel"]:
+            try:
+                g = self.grp.getgrnam(name)
+            except KeyError:
+                continue
+            assert g.gr_gid == 0
+            assert g.gr_mem == ['root'] or g.gr_mem == []
+            assert g.gr_name == name
+            assert isinstance(g.gr_passwd, str)    # usually just 'x', don't hope :-)
+            break
+        else:
+            raise
 
     def test_extra(self):
         grp = self.grp