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