msg58806 - (view) |
Author: Skip Montanaro (skip.montanaro) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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. |
|
|