Саблин Вячеслав, 511 TestFun 6918
Володин Платон 511 TestFun 7330
f1class Tester:f1class Tester:
22
3    def __init__(self, fun):3    def __init__(self, fun):
4        self.fun = fun4        self.fun = fun
55
6    def __call__(self, suite, allowed=()):6    def __call__(self, suite, allowed=()):
7        allowed = tuple(allowed or ())7        allowed = tuple(allowed or ())
8        had_allowed = False8        had_allowed = False
9        for args in suite:9        for args in suite:
10            try:10            try:
11                self.fun(*args)11                self.fun(*args)
n12            except Exception as exc:n12            except Exception as e:
13                if allowed and isinstance(exc, allowed):13                if allowed and isinstance(e, allowed):
14                    had_allowed = True14                    had_allowed = True
t15                else:t15                    continue
16                    return 116                return 1
17        return -1 if had_allowed else 017        return -1 if had_allowed else 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op