summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_normalization.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-11-01 21:26:14 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-11-01 21:26:14 (GMT)
commit8844153d7f3c5ff00e844f674cd639af4ab8addc (patch)
tree4cba622b57584eed3e97e9917298700517a8b76b /Lib/test/test_normalization.py
parent373469a251b519b129171b716134f6b788d7a162 (diff)
downloadcpython-8844153d7f3c5ff00e844f674cd639af4ab8addc.zip
cpython-8844153d7f3c5ff00e844f674cd639af4ab8addc.tar.gz
cpython-8844153d7f3c5ff00e844f674cd639af4ab8addc.tar.bz2
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 0eea4bf..6a75741 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)
+ except IOError:
+ self.skipTest("Could not retrieve " + TESTDATAURL)
for line in open_urlresource(TESTDATAURL):
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__":