Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_normalization.py @ 57050:57542b502d32 2.6
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
........
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 01 Nov 2009 21:34:42 +0000 |
| parents | 2ab85c392a8d |
| children | 52a861746129 |
line wrap: on
line diff
--- a/Lib/test/test_normalization.py Sun Nov 01 20:33:31 2009 +0000 +++ b/Lib/test/test_normalization.py Sun Nov 01 21:34:42 2009 +0000 @@ -1,4 +1,4 @@ -from test.test_support import run_unittest, open_urlresource +from test.test_support import run_unittest, open_urlresource, TestSkipped import unittest import sys @@ -96,7 +96,10 @@ def test_main(): # Hit the exception early - open_urlresource(TESTDATAURL) + try: + open_urlresource(TESTDATAURL) + except IOError: + raise TestSkipped("could not retrieve " + TESTDATAURL) run_unittest(NormalizationTest) if __name__ == "__main__":
