diff --git a/test/bidi.t b/test/bidi.t index 4140b01..ebc0d88 100755 --- a/test/bidi.t +++ b/test/bidi.t @@ -10,12 +10,6 @@ test_description='Test bidirectionality of remote-hg' . ./test-lib.sh -if ! python -c 'import mercurial' > /dev/null 2>&1 -then - skip_all='skipping remote-hg tests; mercurial not available' - test_done -fi - # clone to a git repo git_clone () { git clone -q "hg::$1" $2 diff --git a/test/hg-git.t b/test/hg-git.t index 42545ab..f33835c 100755 --- a/test/hg-git.t +++ b/test/hg-git.t @@ -14,12 +14,6 @@ test_description='Test remote-hg output compared to hg-git' export EXPECTED_DIR="$SHARNESS_TEST_DIRECTORY/expected" -if ! python -c 'import mercurial' > /dev/null 2>&1 -then - skip_all='skipping remote-hg tests; mercurial not available' - test_done -fi - git_clone () { git clone -q "hg::$1" $2 && ( diff --git a/test/main.t b/test/main.t index 9315aa1..bb8fdc5 100755 --- a/test/main.t +++ b/test/main.t @@ -10,12 +10,6 @@ test_description='Test remote-hg' . ./test-lib.sh -if ! python -c 'import mercurial' > /dev/null 2>&1 -then - skip_all='skipping remote-hg tests; mercurial not available' - test_done -fi - check () { echo $3 > expected && git --git-dir=$1/.git log --format='%s' -1 $2 > actual && diff --git a/test/test-lib.sh b/test/test-lib.sh index 3daee04..0dada11 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -3,6 +3,11 @@ : "${SHARNESS_TEST_SRCDIR:=$(cd "$(dirname "${BASH_SOURCE-$0}")" && pwd)}" . "$SHARNESS_TEST_SRCDIR"/sharness.sh +if ! python -c 'import mercurial' > /dev/null 2>&1 +then + error 'mercurial not available' +fi + GIT_AUTHOR_EMAIL=author@example.com GIT_AUTHOR_NAME='A U Thor' GIT_COMMITTER_EMAIL=committer@example.com