(condition, msg, *, warn_only=False, skip=False)
| 46 | |
| 47 | |
| 48 | def check(condition, msg, *, warn_only=False, skip=False): |
| 49 | global pass_count, fail_count, warn_count, skip_count |
| 50 | if skip: |
| 51 | skip_count += 1 |
| 52 | print(f" {SKIP} {msg}") |
| 53 | return True |
| 54 | if condition: |
| 55 | pass_count += 1 |
| 56 | print(f" {PASS} {msg}") |
| 57 | return True |
| 58 | if warn_only: |
| 59 | warn_count += 1 |
| 60 | print(f" {WARN} {msg}") |
| 61 | return True |
| 62 | fail_count += 1 |
| 63 | print(f" {FAIL} {msg}") |
| 64 | return False |
| 65 | |
| 66 | |
| 67 | def info(msg): |
no outgoing calls
no test coverage detected