Орлов Михаил, 418 группа TestFun 7099
Подлужный Олег 304 КФ TestFun 6633
f1class Tester:f1class Tester:
22
n3    def __init__(self, func):n3    def __init__(self, fun):
4        self.func = func4        self.fun = fun
55
6    def __call__(self, suite, allowed=()):6    def __call__(self, suite, allowed=()):
n7        allowed_found = Falsen7        has_allowed = False
8        bad_found = False8        has_not_allowed = False
9        for args in suite:9        for args in suite:
10            try:10            try:
n11                self.func(*args)n11                self.fun(*args)
12            except Exception as e:12            except Exception as e:
13                if any((isinstance(e, exc) for exc in allowed)):13                if any((isinstance(e, exc) for exc in allowed)):
n14                    allowed_found = Truen14                    has_allowed = True
15                else:15                else:
n16                    bad_found = Truen16                    has_not_allowed = True
17        if bad_found:17        if has_not_allowed:
18            return 118            return 1
t19        elif allowed_found:t19        elif has_allowed:
20            return -120            return -1
21        else:21        else:
22            return 022            return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op