changeset: 91317:aeeb385e61e4 parent: 91306:fdfa15a9243c user: Giampaolo Rodola' date: Sun Jun 22 12:43:19 2014 +0200 files: Lib/test/test_asynchat.py description: #6916: attempt to fix BB failure diff -r fdfa15a9243c -r aeeb385e61e4 Lib/test/test_asynchat.py --- a/Lib/test/test_asynchat.py Sat Jun 21 13:59:25 2014 +0200 +++ b/Lib/test/test_asynchat.py Sun Jun 22 12:43:19 2014 +0200 @@ -263,7 +263,8 @@ def test_basic(self): with warnings.catch_warnings(record=True) as w: f = asynchat.fifo() - assert issubclass(w[0].category, DeprecationWarning) + if w: + assert issubclass(w[0].category, DeprecationWarning) f.push(7) f.push(b'a') self.assertEqual(len(f), 2) @@ -280,7 +281,8 @@ def test_given_list(self): with warnings.catch_warnings(record=True) as w: f = asynchat.fifo([b'x', 17, 3]) - assert issubclass(w[0].category, DeprecationWarning) + if w: + assert issubclass(w[0].category, DeprecationWarning) self.assertEqual(len(f), 3) self.assertEqual(f.pop(), (1, b'x')) self.assertEqual(f.pop(), (1, 17))