Skip to content

Commit 9f66dd0

Browse files
committed
temporary suppress httpretty warnings
httpretty throws: - a PendingDeprecationWarning : httpretty/core.py:438: PendingDeprecationWarning: isAlive() is deprecated, use is_alive() instead if t.isAlive(): - a ResourceWarning : httpretty/core.py:485: ResourceWarning: unclosed file <_io.BufferedRandom name=7> self.fd = FakeSockFile() There already are issues and PRs to fix these: - gabrielfalcao/HTTPretty#368 - gabrielfalcao/HTTPretty#377 Until they are fixed I'm suppressing them
1 parent 9f9be6a commit 9f66dd0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pusher_tests/test_requests_adapter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@
55
from pusher import Pusher
66
import unittest
77
import httpretty
8+
import sys
89

910
class TestRequestsBackend(unittest.TestCase):
1011

1112
def setUp(self):
13+
14+
# temporary ignoring warnings until these are sorted:
15+
# https://github.com/gabrielfalcao/HTTPretty/issues/368
16+
# https://github.com/gabrielfalcao/HTTPretty/pull/377
17+
if sys.version_info[0] >= 3:
18+
import warnings
19+
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed file <_io.BufferedRandom name*")
20+
warnings.filterwarnings("ignore", category=PendingDeprecationWarning, message="isAlive*")
21+
1222
self.pusher = Pusher.from_url(u'http://key:secret@api.pusherapp.com/apps/4')
1323

1424
@httpretty.activate

0 commit comments

Comments
 (0)