MCPcopy Index your code
hub / github.com/RustPython/RustPython / setUp

Method setUp

Lib/test/test_urllib2_localnet.py:457–469  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

455 """
456
457 def setUp(self):
458 super(TestUrlopen, self).setUp()
459
460 # clear _opener global variable
461 self.addCleanup(urllib.request.urlcleanup)
462
463 # Ignore proxies for localhost tests.
464 def restore_environ(old_environ):
465 os.environ.clear()
466 os.environ.update(old_environ)
467 self.addCleanup(restore_environ, os.environ.copy())
468 os.environ['NO_PROXY'] = '*'
469 os.environ['no_proxy'] = '*'
470
471 def urlopen(self, url, data=None, **kwargs):
472 l = []

Callers 2

setUpMethod · 0.45
setUpMethod · 0.45

Calls 3

superClass · 0.85
addCleanupMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected