Lines Matching refs:setattr
926 setattr(E, lop, lambda self, other: 'str' + lop + str(other))
927 setattr(E, rop, lambda self, other: str(other) + rop + 'str')
2671 self.assertRaises(AttributeError, setattr, x, 'real', 100)
2672 self.assertRaises(AttributeError, setattr, x, 'imag', 100)
2673 self.assertRaises(AttributeError, setattr, x, 'conjugate', 100)
2674 self.assertRaises(AttributeError, setattr, x, '__complex__', 100)
2867 self.assertRaises(TypeError, setattr, c, 'rounding', s)
2870 self.assertRaises(TypeError, setattr, c, 'rounding', s)
4082 setattr(c, attr, 999999)
4084 self.assertRaises(ValueError, setattr, c, attr, -1)
4085 self.assertRaises(TypeError, setattr, c, attr, 'xyz')
4088 setattr(c, 'Emin', -999999)
4090 self.assertRaises(ValueError, setattr, c, 'Emin', 1)
4091 self.assertRaises(TypeError, setattr, c, 'Emin', (1,2,3))
4093 self.assertRaises(TypeError, setattr, c, 'rounding', -1)
4094 self.assertRaises(TypeError, setattr, c, 'rounding', 9)
4095 self.assertRaises(TypeError, setattr, c, 'rounding', 1.0)
4096 self.assertRaises(TypeError, setattr, c, 'rounding', 'xyz')
4100 self.assertRaises(ValueError, setattr, c, attr, -1)
4101 self.assertRaises(ValueError, setattr, c, attr, 2)
4102 self.assertRaises(TypeError, setattr, c, attr, [1,2,3])
4105 self.assertRaises(AttributeError, setattr, c, 'emax', 100)
4108 self.assertRaises(TypeError, setattr, c, 'flags', [])
4109 self.assertRaises(KeyError, setattr, c, 'flags', {})
4110 self.assertRaises(KeyError, setattr, c, 'traps',
4120 self.assertRaises(TypeError, setattr, c, 9)
4875 self.assertRaises(TypeError, setattr, c, 'flags', ['x'])
4876 self.assertRaises(TypeError, setattr, c,'traps', ['y'])
4877 self.assertRaises(KeyError, setattr, c, 'flags', {0:1})
4878 self.assertRaises(KeyError, setattr, c, 'traps', {0:1})
4885 self.assertRaises(KeyError, setattr, c, 'flags', d)
4886 self.assertRaises(KeyError, setattr, c, 'traps', d)
4894 self.assertRaises(ValueError, setattr, c, attr, gt_max_emax)
4895 self.assertRaises(ValueError, setattr, c, 'Emin', -gt_max_emax)
4911 self.assertRaises(OverflowError, setattr, c, attr, int_max+1)
4912 self.assertRaises(OverflowError, setattr, c, attr, -int_max-2)
4914 self.assertRaises(ValueError, setattr, c, attr, int_max)
4915 self.assertRaises(ValueError, setattr, c, attr, -int_max-1)
4940 self.assertRaises(ValueError, setattr, c, attr, -1)
4941 self.assertRaises(ValueError, setattr, c, attr, 2)
4942 self.assertRaises(TypeError, setattr, c, attr, [1,2,3])
4944 self.assertRaises(ValueError, setattr, c, attr, 2**32)
4945 self.assertRaises(ValueError, setattr, c, attr, 2**32+1)
4986 self.assertRaises(OverflowError, setattr, c, '_allcr', int_max+1)
4987 self.assertRaises(OverflowError, setattr, c, '_allcr', -int_max-2)
4989 self.assertRaises(ValueError, setattr, c, '_allcr', int_max)
4990 self.assertRaises(ValueError, setattr, c, '_allcr', -int_max-1)
4994 self.assertRaises(OverflowError, setattr, c, attr, int_max+1)
4995 self.assertRaises(OverflowError, setattr, c, attr, -int_max-2)
4997 self.assertRaises(TypeError, setattr, c, attr, int_max)
4998 self.assertRaises(TypeError, setattr, c, attr, -int_max-1)
5001 self.assertRaises(ValueError, setattr, c, '_allcr', -1)
5002 self.assertRaises(ValueError, setattr, c, '_allcr', 2)
5003 self.assertRaises(TypeError, setattr, c, '_allcr', [1,2,3])
5005 self.assertRaises(ValueError, setattr, c, '_allcr', 2**32)
5006 self.assertRaises(ValueError, setattr, c, '_allcr', 2**32+1)
5010 self.assertRaises(TypeError, setattr, c, attr, 999999)
5011 self.assertRaises(TypeError, setattr, c, attr, 'x')
5762 setattr(CIBMTestCases, 'test_' + head, tester)
5763 setattr(PyIBMTestCases, 'test_' + head, tester)