Skip to content

Commit

Permalink
http.client_test: Handle case with multiple warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chfoo committed Feb 19, 2015
1 parent d171aa6 commit dd9dd04
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wpull/http/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def test_client_did_not_complete(self):
for warn_obj in warn_list:
print(warn_obj)

self.assertEqual(1, len(warn_list))
# Unrelated warnings may occur in PyPy
# https://travis-ci.org/chfoo/wpull/jobs/51420202
self.assertGreaterEqual(1, len(warn_list))

for warn_obj in warn_list:
if str(warn_obj.message) == 'HTTP session did not complete.':
break
else:
self.fail('Warning did not occur.')

client = Client()

Expand Down

0 comments on commit dd9dd04

Please sign in to comment.