diff tests/test-run-tests.py @ 47573:75b623801f6a

run-tests: use a global WINDOWS constant instead of multiple tests This should make the code clearer. This required the adjustement of a hack in the code testing this code. Differential Revision: https://phab.mercurial-scm.org/D11041
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 09 Jul 2021 15:39:43 +0200
parents 2372284d9457
children 6000f5b25c9b
line wrap: on
line diff
--- a/tests/test-run-tests.py	Fri Jul 09 13:36:39 2021 +0200
+++ b/tests/test-run-tests.py	Fri Jul 09 15:39:43 2021 +0200
@@ -62,6 +62,8 @@
         >>> os.altsep = True
         >>> _osname = os.name
         >>> os.name = 'nt'
+        >>> _old_windows = run_tests.WINDOWS
+        >>> run_tests.WINDOWS = True
 
     valid match on windows
         >>> lm(b'g/a*/d (glob)\n', b'g\\abc/d\n')
@@ -80,6 +82,7 @@
     restore os.altsep
         >>> os.altsep = _osaltsep
         >>> os.name = _osname
+        >>> run_tests.WINDOWS = _old_windows
     """
     pass