]> git.ipfire.org Git - thirdparty/Python/cpython.git/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 ce96ce465e72eba9f2b12a0f15c3346689a57775..30a39f7b8956502631bd8676b093b9ae71dc2af6 100755 (executable)
@@ -53,7 +53,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()