Patchwork D9808: hghave: adjust the definition of `tic` to allow curses tests on Windows

login
register
mail settings
Submitter phabricator
Date Jan. 17, 2021, 7:52 a.m.
Message ID <differential-rev-PHID-DREV-3lbzq6qxskoogi57hj24-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48119/
State Superseded
Headers show

Comments

phabricator - Jan. 17, 2021, 7:52 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Might as well pick up the test coverage if it works as-is.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9808

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -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