Lines Matching refs:setitem
72 def setitem(value): function
74 self.assertRaises(TypeError, setitem, b"a")
75 self.assertRaises(TypeError, setitem, 65)
76 self.assertRaises(TypeError, setitem, memoryview(b"a"))
103 def setitem(key, value): function
106 self.assertRaises(IndexError, setitem, 6, b"a")
107 self.assertRaises(IndexError, setitem, -7, b"a")
108 self.assertRaises(IndexError, setitem, sys.maxsize, b"a")
109 self.assertRaises(IndexError, setitem, -sys.maxsize, b"a")
111 self.assertRaises(TypeError, setitem, 0.0, b"a")
112 self.assertRaises(TypeError, setitem, (0,), b"a")
113 self.assertRaises(TypeError, setitem, "a", b"a")
115 self.assertRaises(ValueError, setitem, 0, b"")
116 self.assertRaises(ValueError, setitem, 0, b"ab")
117 self.assertRaises(ValueError, setitem, slice(1,1), b"a")
118 self.assertRaises(ValueError, setitem, slice(0,2), b"a")