Подлужный Олег 304 КФ TestFun 6633
Орлов Михаил, 418 группа TestFun 7099
f1class Tester:f1class Tester:
22
n3    def __init__(self, fun):n3    def __init__(self, func):
4        self.fun = fun4        self.func = func
55
6    def __call__(self, suite, allowed=()):6    def __call__(self, suite, allowed=()):
n7        has_allowed = Falsen7        allowed_found = False
8        has_not_allowed = False8        bad_found = False
9        for args in suite:9        for args in suite:
10            try:10            try:
n11                self.fun(*args)n11                self.func(*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                    has_allowed = Truen14                    allowed_found = True
15                else:15                else:
n16                    has_not_allowed = Truen16                    bad_found = True
17        if has_not_allowed:17        if bad_found:
18            return 118            return 1
t19        elif has_allowed:t19        elif allowed_found:
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