Skip to content

Commit

Permalink
Added pytype None checks to console_summary.py.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599483691
  • Loading branch information
OpenHTF Owners authored and copybara-github committed Jan 18, 2024
1 parent e892a9e commit adabc50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openhtf/output/callbacks/console_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ def __init__(self,
# pylint: enable=invalid-name

def __call__(self, record: test_record.TestRecord) -> None:
if record is None:
raise ValueError('record is None')
outcome = record.outcome
if outcome is None:
raise ValueError('record.outcome is None')
output_lines = [
''.join((self.color_table[record.outcome], self.BOLD,
record.code_info.name, ':', record.outcome.name, self.RESET))
record.code_info.name, ':', outcome.name, self.RESET))
]
if record.outcome != test_record.Outcome.PASS:
for phase in record.phases:
Expand Down

0 comments on commit adabc50

Please sign in to comment.