diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -702,8 +702,8 @@ return os.path.isdir(os.path.join(t, "..", ".hg")) -@check("tic", "terminfo compiler and curses module") -def has_tic(): +@check("curses", "terminfo compiler and curses module") +def has_curses(): try: import curses @@ -714,11 +714,17 @@ if os.name == 'nt': return True - return matchoutput('test -x "`which tic`"', br'') + return has_tic() + except (ImportError, AttributeError): return False +@check("tic", "terminfo compiler") +def has_tic(): + return matchoutput('test -x "`which tic`"', br'') + + @check("xz", "xz compression utility") def has_xz(): # When Windows invokes a subprocess in shell mode, it uses `cmd.exe`, which diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t --- a/tests/test-commit-interactive-curses.t +++ b/tests/test-commit-interactive-curses.t @@ -1,4 +1,4 @@ -#require tic +#require curses Set up a repo diff --git a/tests/test-revert-interactive-curses.t b/tests/test-revert-interactive-curses.t --- a/tests/test-revert-interactive-curses.t +++ b/tests/test-revert-interactive-curses.t @@ -1,4 +1,4 @@ -#require tic +#require curses Revert interactive tests with the Curses interface