msg142621 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-08-21 14:08 |
When I run make test on 3.3 now, I get failures because the tests try to make HTTP requests.
|
msg142622 - (view) |
Author: Nadeem Vawda (nadeem.vawda) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-08-21 14:23 |
Are the failures because the machine you're running the test on doesn't
have internet access? Or are there problems with some of the tests?
The attached patch should solve the problem.
|
msg142623 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-08-21 14:32 |
Yes, the machine did not have Internet access. Before the run_tests.py patch, the urlfetch resource was not enabled by default.
I don’t want to disconnect to test the patch, but it looks good:
/home/wok/python/3.3/python -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-urlfetch,-audio,-gui
Thanks!
|
msg142624 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-08-21 14:33 |
> Before the run_tests.py patch, the urlfetch resource was not enabled
> by default.
I’m referring to the addition of run_tests.py, not this patch.
|
msg142625 - (view) |
Author: Roundup Robot (python-dev) ![Python triager (Python triager)](@@file/triager.png) |
Date: 2011-08-21 14:42 |
New changeset 228fd2bd83a5 by Nadeem Vawda in branch 'default':
Issue #12804: Prevent "make test" from using network resources.
http://hg.python.org/cpython/rev/228fd2bd83a5
|
msg144734 - (view) |
Author: Antoine Pitrou (pitrou) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-01 14:37 |
Please consider reverting this patch. If you have flaky network connection, you can override the test flags yourself.
|
msg144736 - (view) |
Author: Roundup Robot (python-dev) ![Python triager (Python triager)](@@file/triager.png) |
Date: 2011-10-01 14:45 |
New changeset 7fabd75a6ae4 by Antoine Pitrou in branch 'default':
Backout of changeset 228fd2bd83a5 by Nadeem Vawda in branch 'default':
http://hg.python.org/cpython/rev/7fabd75a6ae4
|
msg144737 - (view) |
Author: Antoine Pitrou (pitrou) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-01 14:48 |
Change reverted. "make test" should run a comprehensive test of Python's facilities, and that includes network facilities. We only exclude functionality where testing is hostile to the user (largefile,audio,gui).
You could add "make offlinetest" if you care, though.
|
msg144772 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-02 13:07 |
I don’t have a flaky connection, I have none at all; until this change I could always run just use “make test” for all Python versions. OTOH, I agree with your point that testing networking facilities in the standard test suite makes sense, as most people probably have network access. If it is easy to detect network availability programmatically, we could just use the skip system.
|
msg144785 - (view) |
Author: Nadeem Vawda (nadeem.vawda) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-02 22:27 |
> Change reverted. "make test" should run a comprehensive test of
> Python's facilities
Fair enough.
> If it is easy to detect network availability programmatically, we could
> just use the skip system.
+1. I don't know if there is a reasonable way to do this, but if so, that
would be the best solution.
|
msg144787 - (view) |
Author: Antoine Pitrou (pitrou) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-02 22:45 |
> > If it is easy to detect network availability programmatically, we could
> > just use the skip system.
>
> +1. I don't know if there is a reasonable way to do this, but if so, that
> would be the best solution.
Actually, the skip system is already supposed to work for that if used
properly (see test.support.transient_internet()). However, perhaps it
actually doesn't work in all situations.
|
msg144792 - (view) |
Author: Nadeem Vawda (nadeem.vawda) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-02 23:03 |
Oh, neat. I'll take a look at that when I get a chance.
|
msg144810 - (view) |
Author: Ezio Melotti (ezio.melotti) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-03 10:09 |
FWIW there's also support.open_urlresource that can be used to download test data. open_urlresouce calls requires('urlfetch') and skips the test when the resource is not enabled. For instance, test_normalization uses it:
try:
testdata = support.open_urlresource(TESTDATAURL, encoding="utf-8",
check=check_version)
except (IOError, HTTPException):
self.skipTest("Could not retrieve " + TESTDATAURL)
self.addCleanup(testdata.close)
This also saves the file on the disk and reuses it when the test is run again, so the connection is actually used once and only if available.
|
msg144898 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2011-10-04 16:17 |
> Actually, the skip system is already supposed to work for that if used
> properly (see test.support.transient_internet()). However, perhaps it
> actually doesn't work in all situations.
It’s better than that: nearly all tests requiring network access use skips, it’s only a few modules like test_urllib*net that fails instead of skipping (certainly because it relied on the urlfetch resource being disabled by default).
|
msg151934 - (view) |
Author: Roundup Robot (python-dev) ![Python triager (Python triager)](@@file/triager.png) |
Date: 2012-01-25 06:44 |
New changeset 585d3664da89 by Nadeem Vawda in branch 'default':
Issue #12804: Fix test failures on systems without internet access.
http://hg.python.org/cpython/rev/585d3664da89
|
msg152333 - (view) |
Author: Éric Araujo (eric.araujo) * ![Python committer (Python committer)](@@file/committer.png) |
Date: 2012-01-30 17:22 |
Thanks!
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:20 | admin | set | github: 57013 |
2012-01-30 17:22:21 | eric.araujo | set | messages:
+ msg152333 |
2012-01-25 07:32:07 | nadeem.vawda | set | status: open -> closed resolution: fixed stage: needs patch -> resolved |
2012-01-25 06:44:45 | python-dev | set | messages:
+ msg151934 |
2011-10-04 16:17:08 | eric.araujo | set | messages:
+ msg144898 |
2011-10-03 10:09:57 | ezio.melotti | set | nosy:
+ ezio.melotti messages:
+ msg144810
|
2011-10-02 23:03:30 | nadeem.vawda | set | assignee: nadeem.vawda messages:
+ msg144792 |
2011-10-02 22:45:52 | pitrou | set | messages:
+ msg144787 |
2011-10-02 22:27:40 | nadeem.vawda | set | title: make test should not enable the urlfetch resource -> "make test" fails on systems without internet access messages:
+ msg144785 stage: needs patch |
2011-10-02 13:07:52 | eric.araujo | set | messages:
+ msg144772 |
2011-10-01 14:48:27 | pitrou | set | priority: normal -> low resolution: fixed -> (no value) messages:
+ msg144737
components:
+ Tests type: behavior stage: resolved -> (no value) |
2011-10-01 14:45:26 | python-dev | set | messages:
+ msg144736 |
2011-10-01 14:37:49 | pitrou | set | status: closed -> open nosy:
+ brett.cannon, pitrou messages:
+ msg144734
|
2011-08-21 14:44:37 | nadeem.vawda | set | status: open -> closed resolution: fixed stage: resolved |
2011-08-21 14:42:15 | python-dev | set | nosy:
+ python-dev messages:
+ msg142625
|
2011-08-21 14:33:06 | eric.araujo | set | messages:
+ msg142624 |
2011-08-21 14:32:28 | eric.araujo | set | messages:
+ msg142623 |
2011-08-21 14:23:19 | nadeem.vawda | set | files:
+ i12804.patch keywords:
+ patch messages:
+ msg142622
|
2011-08-21 14:08:21 | eric.araujo | create | |