summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-07-17 10:42:05 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-07-17 10:42:05 (GMT)
commit711ed4aedfb6b94da650c165636a676dcc22869d (patch)
tree9c82ff4f7c33b6bb8ddb4a61343c7e8c24968cb2 /Lib/test
parentea3714e6890654167ab4f420ee4cf09cf545ad06 (diff)
downloadcpython-711ed4aedfb6b94da650c165636a676dcc22869d.zip
cpython-711ed4aedfb6b94da650c165636a676dcc22869d.tar.gz
cpython-711ed4aedfb6b94da650c165636a676dcc22869d.tar.bz2
Merged revisions 73930-73932,73937-73939,73945,73951,73954,73962-73963,73970 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73930 | amaury.forgeotdarc | 2009-07-10 12:47:42 -0400 (Fri, 10 Jul 2009) | 2 lines #6447: typo in subprocess docstring ........ r73931 | ezio.melotti | 2009-07-10 16:25:56 -0400 (Fri, 10 Jul 2009) | 1 line more cleanups and if zlib -> skipUnless(zlib) ........ r73932 | kristjan.jonsson | 2009-07-11 04:44:43 -0400 (Sat, 11 Jul 2009) | 3 lines http://bugs.python.org/issue6460 Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them. ........ r73937 | georg.brandl | 2009-07-11 06:12:36 -0400 (Sat, 11 Jul 2009) | 1 line Fix style. ........ r73938 | georg.brandl | 2009-07-11 06:14:54 -0400 (Sat, 11 Jul 2009) | 1 line #6446: fix import_spam() function to use correct error and reference handling. ........ r73939 | georg.brandl | 2009-07-11 06:18:10 -0400 (Sat, 11 Jul 2009) | 1 line #6448: clarify docs for find_module(). ........ r73945 | georg.brandl | 2009-07-11 06:51:31 -0400 (Sat, 11 Jul 2009) | 1 line #6456: clarify the meaning of constants used as arguments to nl_langinfo(). ........ r73951 | georg.brandl | 2009-07-11 10:23:38 -0400 (Sat, 11 Jul 2009) | 2 lines array.array is actually a class. ........ r73954 | tarek.ziade | 2009-07-11 13:21:00 -0400 (Sat, 11 Jul 2009) | 1 line reverted changes for #6459 (doesn't apply on 2.x) ........ r73962 | benjamin.peterson | 2009-07-11 18:15:13 -0400 (Sat, 11 Jul 2009) | 1 line put downloaded test support files in Lib/test/data instead of the cwd ........ r73963 | benjamin.peterson | 2009-07-11 18:25:24 -0400 (Sat, 11 Jul 2009) | 1 line ignore things in Lib/test/data/ ........ r73970 | hirokazu.yamamoto | 2009-07-11 22:04:47 -0400 (Sat, 11 Jul 2009) | 1 line Fixed distutils test. ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/support.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index f24adc8..e11fbae 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -453,13 +453,12 @@ def open_urlresource(url, *args, **kw):
requires('urlfetch')
filename = urllib.parse.urlparse(url)[2].split('/')[-1] # '/': it's URL!
- for path in [os.path.curdir, os.path.pardir]:
- fn = os.path.join(path, filename)
- if os.path.exists(fn):
- return open(fn, *args, **kw)
+ fn = os.path.join(os.path.dirname(__file__), "data", filename)
+ if os.path.exists(fn):
+ return open(fn)
print('\tfetching %s ...' % url, file=get_original_stdout())
- fn, _ = urllib.request.urlretrieve(url, filename)
+ fn, _ = urllib.request.urlretrieve(url, fn)
return open(fn, *args, **kw)