Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a8ec99

Browse files
committed
test_gopher(): Squash another deprecation
warning about gopherlib.
1 parent 313fcd4 commit 2a8ec99

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_urllib2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,11 @@ def test_ftp(self):
704704
self._test_urls(urls, self._extra_handlers())
705705

706706
def test_gopher(self):
707+
import warnings
708+
warnings.filterwarnings("ignore",
709+
"the gopherlib module is deprecated",
710+
DeprecationWarning,
711+
"urllib2$")
707712
urls = [
708713
# Thanks to Fred for finding these!
709714
'gopher://gopher.lib.ncsu.edu/11/library/stacks/Alex',

0 commit comments

Comments
 (0)