Саргсян Тачат 321 TestFun 6702
Пузакова Полина СФ TestFun 6731
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=()):
n7        allowed_exceptions = tuple(allowed)n7        al_ex = tuple(allowed)
8        has_allowed_exceptions = False
9        has_unallowed_exceptions = False8        unallowed_ex_fl = False
9        al_ex_fl = False
10        for params in suite:10        for i in suite:
11            try:11            try:
n12                self.fun(*params)n12                self.fun(*i)
13            except allowed_exceptions:13            except al_ex:
14                has_allowed_exceptions = True14                al_ex_fl = True
15            except Exception:15            except Exception:
n16                has_unallowed_exceptions = Truen16                unallowed_ex_fl = True
17            else:
18                continue
17        if has_unallowed_exceptions:19        if unallowed_ex_fl:
18            return 120            return 1
t19        elif has_allowed_exceptions:t21        elif al_ex_fl:
20            return -122            return -1
21        else:23        else:
22            return 024            return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op