Ковалев Григорий, 524 группа TestFun 6915
Аронов Алдияр, 409 группа TestFun 8473
f1class Tester:f1class Tester:
22
3    def __init__(self, fun):3    def __init__(self, fun):
4        self.fun = fun4        self.fun = fun
55
n6    def __call__(self, suite, allowed: tuple=()):n6    def __call__(self, suite, allowed=()):
7        allowed_tuple = tuple(allowed)7        allowed = tuple(allowed)
8        any_exceptions = False8        exc = False
9        any_disallowed = False9        unal = False
10        for args in suite:10        for args in suite:
11            try:11            try:
12                self.fun(*args)12                self.fun(*args)
13            except Exception as e:13            except Exception as e:
n14                any_exceptions = Truen14                exc = True
15                if not isinstance(e, allowed_tuple):15                if not isinstance(e, allowed):
16                    any_disallowed = True16                    unal = True
17        if any_disallowed:17                    break
18        if unal:
18            return 119            return 1
t19        if any_exceptions:t20        if exc:
20            return -121            return -1
21        return 022        return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op