| Григорьев Денис, 124ая TestFun 6686 | volandlm TestFun 6356 | ||||
|---|---|---|---|---|---|
| f | 1 | class Tester: | f | 1 | class Tester: |
| 2 | 2 | ||||
| 3 | def __init__(self, fun): | 3 | def __init__(self, fun): | ||
| 4 | self.fun = fun | 4 | self.fun = fun | ||
| 5 | 5 | ||||
| 6 | def __call__(self, suite, allowed=()): | 6 | def __call__(self, suite, allowed=()): | ||
| 7 | allowed = tuple(allowed) | 7 | allowed = tuple(allowed) | ||
| n | 8 | flag = 0 | n | 8 | result = 0 |
| 9 | for args in suite: | 9 | for args in suite: | ||
| 10 | try: | 10 | try: | ||
| 11 | self.fun(*args) | 11 | self.fun(*args) | ||
| 12 | except allowed: | 12 | except allowed: | ||
| n | 13 | flag = -1 | n | 13 | result = -1 |
| 14 | except Exception: | 14 | except Exception: | ||
| 15 | return 1 | 15 | return 1 | ||
| t | 16 | return flag | t | 16 | return result |
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||