TestFun/andryha
TestFun/olya.volodina
f1class Tester:f1class Tester:
22
n3    def __init__(self, func):n3    def __init__(self, f):
4        self.func = func4        self.func = f
55
n6    def __call__(self, suite, allowed=[]):n6    def __call__(self, argsexc=[]):
7        has_exc = False7        allowedExc = False
8        for inp in suite:8        for arg in args:
9            try:9            try:
n10                self.func(*inp)n10                self.func(*arg)
11            except tuple(allowed) as e:11            except tuple(exc) as e:
12                has_exc = True12                allowedExc = True
13            except Exception as e:13            except Exception as e:
14                return 114                return 1
t15        if has_exc:t15        return -1 if allowedExc else 0
16            return -1
17        else:
18            return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op