| TestFun/dianarudenko | TestFun/bucholga | ||||
|---|---|---|---|---|---|
| f | 1 | class Tester: | f | 1 | class Tester: |
| 2 | 2 | ||||
| n | 3 | def __init__(self, fun): | n | 3 | def __init__(self, func): |
| 4 | self.fun = fun | 4 | self.func = func | ||
| 5 | 5 | ||||
| t | 6 | def __call__(self, suites, allowed=[]): | t | 6 | def __call__(self, suite, allowed=[]): |
| 7 | result = 0 | 7 | res = 0 | ||
| 8 | try: | 8 | for item in suite: | ||
| 9 | for suite in suites: | ||||
| 10 | try: | 9 | try: | ||
| 11 | self.fun(*suite) | 10 | self.func(*item) | ||
| 12 | except tuple(allowed): | 11 | except tuple(allowed): | ||
| 13 | result = -1 | 12 | res = -1 | ||
| 14 | except: | 13 | except: | ||
| 15 | result = 1 | 14 | res = 1 | ||
| 16 | return result | 15 | return res | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||