diff tests/test-convert-darcs @ 5520:cc3af86ab6fe

test-convert-darcs: skip if we can't find the elementtree module This patch is a bit dirty to avoid having to repeat the dance required to import elementtree.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 09 Nov 2007 20:21:35 -0200
parents a19167001251
children f29b7c8419cb
line wrap: on
line diff
--- a/tests/test-convert-darcs	Fri Nov 09 20:21:35 2007 -0200
+++ b/tests/test-convert-darcs	Fri Nov 09 20:21:35 2007 -0200
@@ -9,6 +9,14 @@
 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
 HOME=do_not_use_HOME_darcs; export HOME
 
+# skip if we can't import elementtree
+mkdir dummy
+mkdir dummy/_darcs
+if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
+    echo 'hghave: missing feature: elementtree module'
+    exit 80
+fi
+
 echo % initialize darcs repo
 mkdir darcs-repo
 cd darcs-repo