Lines Matching refs:MyContext
4115 class MyContext(Context): class
4142 d = MyContext()
4148 self.assertRaises(ValueError, MyContext, **{'prec':-1})
4149 c = MyContext(prec=1)
4154 self.assertRaises(TypeError, MyContext, **{'rounding':'XYZ'})
4155 c = MyContext(rounding=ROUND_DOWN, prec=1)
4160 self.assertRaises(ValueError, MyContext, **{'Emin':5})
4161 c = MyContext(Emin=-1, prec=1)
4169 self.assertRaises(ValueError, MyContext, **{'Emax':-1})
4170 c = MyContext(Emax=1, prec=1)
4178 self.assertRaises(ValueError, MyContext, **{'capitals':-1})
4179 c = MyContext(capitals=0)
4185 self.assertRaises(ValueError, MyContext, **{'clamp':2})
4186 c = MyContext(clamp=1, Emax=99)
4192 self.assertRaises(TypeError, MyContext, **{'flags':'XYZ'})
4193 c = MyContext(flags=[Rounded, DivisionByZero])
4201 self.assertRaises(TypeError, MyContext, **{'traps':'XYZ'})
4202 c = MyContext(traps=[Rounded, DivisionByZero])