]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Now that the backporting of test_mutants.py worked successfully (Barnevelder
authorThomas Wouters <thomas@python.org>
Wed, 23 May 2001 14:55:54 +0000 (14:55 +0000)
committerThomas Wouters <thomas@python.org>
Wed, 23 May 2001 14:55:54 +0000 (14:55 +0000)
chickens work best!) adapt test_mutants to the absense of 'key in dict'.

Lib/test/test_mutants.py

index 3cd35d17a5ffce4eefe1ea1df258f8fd38bbc85e..8b1f47542683c0dc8f9a2695e2bdeebd4f41b65b 100644 (file)
@@ -60,7 +60,7 @@ def maybe_mutate():
         mutate = 0   # disable mutation until key inserted
         while 1:
             newkey = Horrid(random.randrange(100))
-            if newkey not in target:
+            if not target.has_key(newkey):
                 break
         target[newkey] = Horrid(random.randrange(100))
         keys.append(newkey)