# HG changeset patch # User Mads Kiilerich # Date 2014-01-20 00:29:54 # Node ID e457321a568799525ac9d50a090bcc9e725f3558 # Parent 3a3731a6035495bd8e856708494dc163d99a9d37 tests: 'hghave tic' also requires curses support in Python test-status-color.t would fail when using a Python without curses. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -272,7 +272,12 @@ def has_serve(): return os.name != 'nt' # gross approximation def has_tic(): - return matchoutput('test -x "`which tic`"', '') + try: + import curses + curses.COLOR_BLUE + return matchoutput('test -x "`which tic`"', '') + except ImportError: + return False def has_msys(): return os.getenv('MSYSTEM') @@ -324,7 +329,7 @@ checks = { "svn-bindings": (has_svn_bindings, "subversion python bindings"), "symlink": (has_symlink, "symbolic links"), "system-sh": (has_system_sh, "system() uses sh"), - "tic": (has_tic, "terminfo compiler"), + "tic": (has_tic, "terminfo compiler and curses module"), "tla": (has_tla, "GNU Arch tla client"), "unix-permissions": (has_unix_permissions, "unix-style permissions"), "windows": (has_windows, "Windows"),