| TestFun/soapun | 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 | ||||
| 6 | def __call__(self, suite, allowed=[]): | 6 | def __call__(self, suite, allowed=[]): | ||
| n | 7 | result = 0 | n | 7 | res = 0 |
| 8 | for s in suite: | 8 | for item in suite: | ||
| 9 | try: | 9 | try: | ||
| n | 10 | self.fun(*s) | n | 10 | self.func(*item) |
| 11 | except tuple(allowed) as e: | 11 | except tuple(allowed): | ||
| 12 | result = -1 | 12 | res = -1 | ||
| 13 | except: | 13 | except: | ||
| t | 14 | result = 1 | t | 14 | res = 1 |
| 15 | return result | 15 | return res | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||