TestFun/MaximKornilov | TestFun/Egor_Feklisov | ||||
---|---|---|---|---|---|
f | 1 | class Tester: | f | 1 | class Tester: |
2 | 2 | ||||
3 | def __init__(self, func): | 3 | def __init__(self, func): | ||
4 | self.func = func | 4 | self.func = func | ||
5 | 5 | ||||
n | 6 | def __call__(self, suite, exceptions=()): | n | 6 | def __call__(self, suite, allowed=()): |
7 | result = 0 | 7 | ret = 0 | ||
8 | for tup in suite: | 8 | for ii in suite: | ||
9 | try: | 9 | try: | ||
n | 10 | self.func(*tup) | n | 10 | self.func(*ii) |
11 | except (*exceptions,): | 11 | except (*allowed,): | ||
12 | result = -1 | 12 | ret = -1 | ||
13 | except: | 13 | except: | ||
t | 14 | return 1 | t | 14 | ret = 1 |
15 | return result | 15 | return ret |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|