[PATCH 2 of 2] test-url: skip test when ssl module is unavailable

Augie Fackler durin42 at gmail.com
Tue Oct 12 19:49:04 UTC 2010


# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1286899365 18000
# Node ID f7b5a45b5b2d358e8d98576e850694ae02a012d2
# Parent  31eed0fb12a2c183b9dc6ad7e9aa8039cada3d61
test-url: skip test when ssl module is unavailable

diff --git a/tests/test-url.py b/tests/test-url.py
--- a/tests/test-url.py
+++ b/tests/test-url.py
@@ -1,4 +1,9 @@
 #!/usr/bin/env python
+import sys
+try:
+    import ssl
+except ImportError:
+    sys.exit(80)
 
 def check(a, b):
     if a != b:



More information about the Mercurial-devel mailing list