mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#6916: attempt to fix BB failure
This commit is contained in:
parent
47177861dd
commit
4f2eb81280
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
@ -280,7 +281,8 @@ class TestFifo(unittest.TestCase):
|
|||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue