TestFun/naruneph
TestFun/akozlov
f1class Tester:f1class Tester:
22
n3    def __init__(self, func):n3    def __init__(self, fun):
4        self.func = func4        self.fun = fun
55
n6    def __call__(self, suite, allowed=[]):n6    def __call__(self, suite, excs=[]):
7        isallowed = False7        ex_in_list = False
8        isnotallowed = False8        ex_out_list = False
9        for item in suite:9        for elem in suite:
10            try:10            try:
n11                self.func(*item)n11                self.fun(*elem)
12            except tuple(allowed):12            except tuple(excs):
13                isallowed = True13                ex_in_list = True
14            except Exception:14            except:
15                isnotallowed = True15                ex_out_list = True
16        if isnotallowed:16        if ex_out_list:
17            return 117            return 1
t18        elif isallowed:t18        elif ex_in_list:
19            return -119            return -1
20        else:20        else:
21            return 021            return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op