Skip to content

Commit 432bac2

Browse files
committed
Don't turn warnings into errors
1 parent c477938 commit 432bac2

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

Lib/test/test_urllib2net.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,16 @@ def patched_create_connection(address, *args, **kwargs):
170170
with mock.patch('socket.create_connection', patched_create_connection):
171171
with check_no_resource_warning(self):
172172
# Try without CacheFTPHandler
173-
warnings.filterwarnings('error', category=ResourceWarning)
174173
self._test_urls([entry], handlers=no_cache_handlers,
175174
retry=False)
176175
with check_no_resource_warning(self):
177176
# Try with CacheFTPHandler (uncached)
178-
warnings.filterwarnings('error', category=ResourceWarning)
179177
self._test_urls([entry], cache_handlers, retry=False)
180178
with check_no_resource_warning(self):
181179
# Try with CacheFTPHandler (cached)
182-
warnings.filterwarnings('error', category=ResourceWarning)
183180
self._test_urls([entry], cache_handlers, retry=False)
184181
# Try without the mock: the handler should not use a closed connection
185182
with check_no_resource_warning(self):
186-
warnings.filterwarnings('error', category=ResourceWarning)
187183
self._test_urls([url], cache_handlers, retry=False)
188184

189185
def test_file(self):

0 commit comments

Comments
 (0)