[Python-checkins] bpo-36109: Fix random test_descr failure. (GH-12044)

Pablo Galindo webhook-mailer at python.org
Tue Feb 26 01:03:24 EST 2019


https://github.com/python/cpython/commit/ff3d39faa8aa28308cc5eae6843eaac514da8fd8
commit: ff3d39faa8aa28308cc5eae6843eaac514da8fd8
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: Pablo Galindo <Pablogsal at gmail.com>
date: 2019-02-25T22:03:21-08:00
summary:

bpo-36109: Fix random test_descr failure. (GH-12044)

files:
M Lib/test/test_descr.py

diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index b38cb765cdc0..fc885c5e62f2 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4325,7 +4325,11 @@ class Evil(object):
             def __hash__(self):
                 return hash('attr')
             def __eq__(self, other):
-                del C.attr
+                try:
+                    del C.attr
+                except AttributeError:
+                    # possible race condition
+                    pass
                 return 0
 
         class Descr(object):



More information about the Python-checkins mailing list