mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
patman: Correct unit tests to run correctly
It seems that doctest behaves differently now, and some of the unit tests do not run. Adjust the tests to work correctly. ./tools/patman/patman --test <unittest.result.TestResult run=10 errors=0 failures=0> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6ba5737ff0
commit
e752edcb6b
4 changed files with 22 additions and 14 deletions
|
@ -30,8 +30,12 @@ class Color(object):
|
|||
enabled: True if color output should be enabled. If False then this
|
||||
class will not add color codes at all.
|
||||
"""
|
||||
self._enabled = (colored == COLOR_ALWAYS or
|
||||
(colored == COLOR_IF_TERMINAL and os.isatty(sys.stdout.fileno())))
|
||||
try:
|
||||
self._enabled = (colored == COLOR_ALWAYS or
|
||||
(colored == COLOR_IF_TERMINAL and
|
||||
os.isatty(sys.stdout.fileno())))
|
||||
except:
|
||||
self._enabled = False
|
||||
|
||||
def Start(self, color, bright=True):
|
||||
"""Returns a start color code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue