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