]> granicus.if.org Git - python/commitdiff
Fix dbm_gnu test relying on set order.
authorGeorg Brandl <georg@python.org>
Mon, 20 Feb 2012 21:48:06 +0000 (22:48 +0100)
committerGeorg Brandl <georg@python.org>
Mon, 20 Feb 2012 21:48:06 +0000 (22:48 +0100)
Lib/test/test_dbm_gnu.py

index 2173b92afa98ef4dc827e461f1872cd04e38a0e1..f77dcfe49a153ac731b6a69d535ac88ddb93c00e 100755 (executable)
@@ -49,7 +49,7 @@ class TestGdbm(unittest.TestCase):
         all = set(gdbm.open_flags)
         # Test standard flags (presumably "crwn").
         modes = all - set('fsu')
-        for mode in modes:
+        for mode in sorted(modes):  # put "c" mode first
             self.g = gdbm.open(filename, mode)
             self.g.close()