Show More
@@ -88,7 +88,6 b' origenviron = os.environ.copy()' | |||||
88 | osenvironb = getattr(os, 'environb', os.environ) |
|
88 | osenvironb = getattr(os, 'environb', os.environ) | |
89 | processlock = threading.Lock() |
|
89 | processlock = threading.Lock() | |
90 |
|
90 | |||
91 | with_color = False |
|
|||
92 | pygmentspresent = False |
|
91 | pygmentspresent = False | |
93 | # ANSI color is unsupported prior to Windows 10 |
|
92 | # ANSI color is unsupported prior to Windows 10 | |
94 | if os.name != 'nt': |
|
93 | if os.name != 'nt': | |
@@ -96,7 +95,6 b" if os.name != 'nt':" | |||||
96 | import pygments |
|
95 | import pygments | |
97 | import pygments.lexers as lexers |
|
96 | import pygments.lexers as lexers | |
98 | import pygments.formatters as formatters |
|
97 | import pygments.formatters as formatters | |
99 | with_color = True |
|
|||
100 | pygmentspresent = True |
|
98 | pygmentspresent = True | |
101 | except ImportError: |
|
99 | except ImportError: | |
102 | pass |
|
100 | pass | |
@@ -1569,7 +1567,7 b' class TestResult(unittest._TextTestResul' | |||||
1569 | self.faildata = {} |
|
1567 | self.faildata = {} | |
1570 |
|
1568 | |||
1571 | if options.color == 'auto': |
|
1569 | if options.color == 'auto': | |
1572 |
self.color = |
|
1570 | self.color = pygmentspresent and self.stream.isatty() | |
1573 | elif options.color == 'never': |
|
1571 | elif options.color == 'never': | |
1574 | self.color = False |
|
1572 | self.color = False | |
1575 | else: # 'always', for testing purposes |
|
1573 | else: # 'always', for testing purposes |
General Comments 0
You need to be logged in to leave comments.
Login now