Comments
Patch
@@ -89,13 +89,16 @@
processlock = threading.Lock()
with_color = False
-try: # is pygments installed
- import pygments
- import pygments.lexers as lexers
- import pygments.formatters as formatters
- with_color = True
-except ImportError:
- pass
+
+# ANSI color is unsupported prior to Windows 10
+if os.name != 'nt':
+ try: # is pygments installed
+ import pygments
+ import pygments.lexers as lexers
+ import pygments.formatters as formatters
+ with_color = True
+ except ImportError:
+ pass
if not sys.stderr.isatty(): # check if the terminal is capable
with_color = False
@@ -121,6 +121,7 @@
test diff colorisation
+#if no-windows
$ rt test-failure.t --color always
\x1b[38;5;124m--- $TESTTMP/test-failure.t\x1b[39m (esc)
@@ -155,6 +156,7 @@
Failed test-failure.t: output changed
# Ran 1 tests, 0 skipped, 1 failed.
python hash seed: * (glob)
+#endif
basic failing test
$ cat > test-failure.t << EOF