(c)
| 16 | |
| 17 | @task |
| 18 | def check(c) -> None: |
| 19 | count = 0 |
| 20 | failures = [] |
| 21 | for _ in range(0, 1000): |
| 22 | count += 1 |
| 23 | try: |
| 24 | # 'ls' chosen as an arbitrary, fast-enough-for-looping but |
| 25 | # does-some-real-work example (where eg 'sleep' is less useful) |
| 26 | response = c.run("ls", hide=True) |
| 27 | if not response.ok: |
| 28 | failures.append(response) |
| 29 | except Exception as e: |
| 30 | failures.append(e) |
| 31 | if failures: |
| 32 | print("run() FAILED {}/{} times!".format(len(failures), count)) |
| 33 | sys.exit(1) |
| 34 | else: |
| 35 | print("No failures detected after {} runs, A-OK".format(count)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…