TestFun/Rizvan Zaidullin
TestFun/threepwood
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        ok = 0n7        err = 0
8        for i in suite:8        for s in suite:
9            try:9            try:
n10                self.fun(*i)n10                self.fun(*s)
11            except tuple(allowed):11            except tuple(allowed):
n12                ok = -1n12                err = -1
13            except:13            except:
t14                return 1t14                err = 1
15                break
15        return ok16        return err
16import sys17import sys
17exec(sys.stdin.read(), globals())18exec(sys.stdin.read(), globals())
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op