diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2014-06-22 10:43:19 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2014-06-22 10:43:19 (GMT) |
commit | 4f2eb81280e59325f4d3748b0a301ceb6af4af01 (patch) | |
tree | 0138f11884e16b90b2acef6780e416383750e06e /Lib/test/test_asynchat.py | |
parent | 47177861dd7995b4cd27acb9757f0e804e3f06e4 (diff) | |
download | cpython-4f2eb81280e59325f4d3748b0a301ceb6af4af01.zip cpython-4f2eb81280e59325f4d3748b0a301ceb6af4af01.tar.gz cpython-4f2eb81280e59325f4d3748b0a301ceb6af4af01.tar.bz2 |
#6916: attempt to fix BB failure
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r-- | Lib/test/test_asynchat.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py index dd606d6..55e0d2a 100644 --- a/Lib/test/test_asynchat.py +++ b/Lib/test/test_asynchat.py @@ -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)) |