google / google/openhtf

Test outcome banner is missing when a test errors out

Open
#795 0 comments 0 reactions 1 assignee Claimed by @jettisonjoe View on GitHub
feature request
Dominant language
Python
Stars
722
Forks
237
Avg merge
11h 31m
Merged PRs (30d)
4

Description

This might have been intentional, but the test outcome banner is missing when an error occurs in a test. My expectation would be that we always get the banner to clearly indicate the test outcome, even when an error is printed afterwards.

### Repro steps

Add `raise Exception('An error occured')` at the bottom of the `hello_world` phase in `hello_world.py`, then run as normal with `py -m examples.hello_world`.

Result:
```
Enter a DUT ID in order to start the test.
--> hi

Error: An error occurred.
```

Compare with when a test is aborted or fails, where we get one of the following:

```
=========== test: openhtf_test outcome: ABORTED ===========
```

```
============= test: openhtf_test outcome: FAIL ============
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.