--- a/tests/test-bad-extension
+++ b/tests/test-bad-extension
@@ -4,6 +4,8 @@ echo 'syntax error' > badext.py
abspath=`pwd`/badext.py
echo '[extensions]' >> $HGRCPATH
+echo "gpg =" >> $HGRCPATH
+echo "hgext.gpg =" >> $HGRCPATH
echo "badext = $abspath" >> $HGRCPATH
hg -q help help