hghave: adjust the definition of `tic` to allow curses tests on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 17 Jan 2021 02:50:26 -0500
changeset 46320 ef771d329961
parent 46319 3dfebba99ef6
child 46321 d32e7ed81f4f
hghave: adjust the definition of `tic` to allow curses tests on Windows Might as well pick up the test coverage if it works as-is. Differential Revision: https://phab.mercurial-scm.org/D9808
tests/hghave.py
--- a/tests/hghave.py	Wed Dec 09 00:51:35 2020 -0500
+++ b/tests/hghave.py	Sun Jan 17 02:50:26 2021 -0500
@@ -708,6 +708,12 @@
         import curses
 
         curses.COLOR_BLUE
+
+        # Windows doesn't have a `tic` executable, but the windows_curses
+        # package is sufficient to run the tests without it.
+        if os.name == 'nt':
+            return True
+
         return matchoutput('test -x "`which tic`"', br'')
     except (ImportError, AttributeError):
         return False