Аронов Алдияр, 409 группа TestFun 8473
Ковалев Григорий, 524 группа TestFun 6915
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=()):n6    def __call__(self, suite, allowed: tuple=()):
7        allowed = tuple(allowed)7        allowed_tuple = tuple(allowed)
8        exc = False8        any_exceptions = False
9        unal = False9        any_disallowed = 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                exc = Truen14                any_exceptions = True
15                if not isinstance(e, allowed):15                if not isinstance(e, allowed_tuple):
16                    unal = True16                    any_disallowed = True
17                    break17        if any_disallowed:
18        if unal:
19            return 118            return 1
t20        if exc:t19        if any_exceptions:
21            return -120            return -1
22        return 021        return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op