A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-April/034548.html below:

[Python-Dev] Using temp files and the Internet in regression tests

[Python-Dev] Using temp files and the Internet in regression tests [Python-Dev] Using temp files and the Internet in regression testsGuido van Rossum guido@python.org
Sun, 13 Apr 2003 08:54:37 -0400
> > Connecting to the Internet: only if the network resource is enabled.
> > Then it is up to the tester to make sure that connection to the
> > Internet is possible.
> 
> Any suggestions on how to go about this?  An initial connection to
> python.org after setting socket.setdefaulttimeout() to something
> reasonable (like 10 seconds?) and raising test_support.TestSkipped if it
> times out?

No, you check whether the 'network' resource name is enabled in
test_support.  Use test_support.is_resource_enabled('network').

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4