Алтухов Егор, 321 группа TestFun 6341
s02220725 TestFun 6406
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        fl = Falsen7        had_exception = False
8        for args in suite:8        for args in suite:
9            try:9            try:
10                self.fun(*args)10                self.fun(*args)
11            except Exception as e:11            except Exception as e:
n12                fl = Truen12                had_exception = True
13                if not isinstance(e, tuple(allowed)):13                if not isinstance(e, tuple(allowed)):
14                    return 114                    return 1
t15        if fl:t15        if had_exception:
16            return -116            return -1
17        return 017        return 0
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op