summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_normalization.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-11-01 22:07:18 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-11-01 22:07:18 (GMT)
commit2fe253436ae345387e9aaf9f8354a404b1a850e4 (patch)
tree36560291d25405ded40340b1e3c0f1c5443f205a /Lib/test/test_normalization.py
parenta9311a3c50ff7f8469c61f6e3bfac87358e4ac5a (diff)
downloadcpython-2fe253436ae345387e9aaf9f8354a404b1a850e4.zip
cpython-2fe253436ae345387e9aaf9f8354a404b1a850e4.tar.gz
cpython-2fe253436ae345387e9aaf9f8354a404b1a850e4.tar.bz2
Merged revisions 76036 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76036 | antoine.pitrou | 2009-11-01 22:43:20 +0100 (dim., 01 nov. 2009) | 9 lines Merged revisions 76033 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76033 | antoine.pitrou | 2009-11-01 22:26:14 +0100 (dim., 01 nov. 2009) | 3 lines test_normalization should skip and not crash when the resource isn't available ........ ................
Diffstat (limited to 'Lib/test/test_normalization.py')
-rw-r--r--Lib/test/test_normalization.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
index f92a714..dbe1a11 100644
--- a/Lib/test/test_normalization.py
+++ b/Lib/test/test_normalization.py
@@ -40,6 +40,11 @@ def unistr(data):
class NormalizationTest(unittest.TestCase):
def test_main(self):
part1_data = {}
+ # Hit the exception early
+ try:
+ open_urlresource(TESTDATAURL, encoding="utf-8")
+ except IOError:
+ self.skipTest("Could not retrieve " + TESTDATAURL)
for line in open_urlresource(TESTDATAURL, encoding="utf-8"):
if '#' in line:
line = line.split('#')[0]
@@ -95,8 +100,6 @@ class NormalizationTest(unittest.TestCase):
def test_main():
- # Hit the exception early
- open_urlresource(TESTDATAURL)
run_unittest(NormalizationTest)
if __name__ == "__main__":