Issue 1659: Tests needing network flag? (original) (raw)

Issue1659

Created on 2007-12-19 15:17 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
network.diff skip.montanaro,2007-12-19 15:17
1659.no_network.diff techtonik,2010-04-01 16:58
Messages (10)
msg58806 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-12-19 15:17
While riding to work today I ran the test suite on trunk. The following tests failed due to lack of network connectivity: test_socket test_socket_ssl test_ssl test_urllib2 These tests should probably either require -u network or should themselves check to see if the network is available and skip those tests requiring network connectivity. In fact, regrtest.py's comments list test_socket_ssl as requiring the network resource. That seems to have regressed since 2.5 Simple patch attached. Skip
msg60241 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-01-19 22:47
This is an easy patch, but I'd like someone to at least verify it works before checking it in... nudge, nudge, wink, wink...
msg60243 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-19 22:50
This won't work without corresponding changes in regrtest.py; it currently mentions test_socket_ssl and test_timeout explicitly.
msg60258 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2008-01-20 02:31
> it currently mentions test_socket_ssl and test_timeout explicitly "it" being regrtest.py? This patch works for me. In what way is regrtest's reference to test_socket_ssl (for example) a problem? All I did for that test was tighten up the requirements to run the test. I didn't do anything with test_timeout. It's unclear to me why you mentioned it.
msg60263 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-20 08:44
Sorry, I was being unclear. I grepped through Lib/test for "skip_expected" and couldn't find a location where e.g. the newly set test_urllib2.skip_expected would be accessed. regrtest.py only accesses this attribute on the two modules I named.
msg60267 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-20 09:08
I've disabled a single test in socket if the network resource isn't enable. It fixes the problem for me when I'm offline or my WLAN is broken again. The test was also called by test_ssl.
msg63519 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-14 01:36
I think, for the cases that are not special-cased by regrtest, test.test_support.requires() should be used.
msg102106 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-01 16:58
Updated patch. test_socket - whole suite will be skipped test_socket_ssl - no more avail test_ssl - only test that require network will be marked as skipped test_urllib2 - untouched, requires fine-grained approach, probably for separate ticket
msg102107 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-01 17:01
I propose to split this issue. One is to test which tests that marked with `test_support.requires('network')` _really_ need network connection. Second is annotation of appropriate methods instead of whole test suite to count exact number of tests skipped due to absent resource.
msg154107 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-24 04:10
All tests now use regrtest resources and/or unittest skips and/or test.support.transient_internet. I ran the faulty tests mentioned in this report while disconnected and got no failure, only skips. Closing as duplicate/out of date.
History
Date User Action Args
2022-04-11 14:56:29 admin set github: 46000
2012-02-24 04:10:02 eric.araujo set status: open -> closednosy: + eric.araujomessages: + resolution: out of datestage: resolved
2010-05-20 20:42:26 skip.montanaro set assignee: skip.montanaro ->
2010-05-20 20:37:11 skip.montanaro set nosy: - skip.montanaro
2010-04-01 17:01:02 techtonik set messages: +
2010-04-01 16:58:04 techtonik set files: + 1659.no_network.diffcomponents: + Testsversions: + Python 2.7keywords: + patchnosy: + techtonikmessages: +
2008-03-14 01:36:03 brett.cannon set assignee: brett.cannon -> skip.montanaromessages: +
2008-01-20 09:08:51 christian.heimes set nosy: + christian.heimesmessages: +
2008-01-20 08:44:24 georg.brandl set messages: +
2008-01-20 02:31:48 skip.montanaro set messages: +
2008-01-19 22:50:49 georg.brandl set nosy: + georg.brandlmessages: +
2008-01-19 22:47:12 skip.montanaro set keywords: + easymessages: +
2007-12-19 21:09:25 brett.cannon set assignee: brett.cannonnosy: + brett.cannon
2007-12-19 15:17:30 skip.montanaro create