Skip to content

Commit

Permalink
#6916: attempt to fix BB failure
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 22, 2014
1 parent 4717786 commit 4f2eb81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lib/test/test_asynchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ class TestFifo(unittest.TestCase):
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)
Expand All @@ -280,7 +281,8 @@ def test_basic(self):
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))
Expand Down

0 comments on commit 4f2eb81

Please sign in to comment.