Skip to content

Commit 98fe23e

Browse files
authored
Merge pull request #150 from pusher/fix-httpretty-warnings
Temporary suppress httpretty warnings
2 parents 0eca3cc + 9f66dd0 commit 98fe23e

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)