| TestFun/khadmma | TestFun/lngsv | ||||
|---|---|---|---|---|---|
| f | 1 | class Tester: | f | 1 | class Tester: |
| 2 | 2 | ||||
| n | 3 | def __init__(self, fun): | n | 3 | def __init__(self, foo): |
| 4 | self.fun = fun | 4 | self.foo = foo | ||
| 5 | 5 | ||||
| 6 | def __call__(self, suite, allowed=[]): | 6 | def __call__(self, suite, allowed=[]): | ||
| 7 | res = 0 | 7 | res = 0 | ||
| n | 8 | for arg in suite: | n | 8 | for s in suite: |
| 9 | try: | 9 | try: | ||
| t | 10 | self.fun(*arg) | t | 10 | self.foo(*s) |
| 11 | except tuple(allowed): | 11 | except tuple(allowed) as e: | ||
| 12 | res = -1 | 12 | res = -1 | ||
| 13 | except Exception: | 13 | except Exception: | ||
| 14 | return 1 | 14 | return 1 | ||
| 15 | return res | 15 | return res | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||