Home
last modified time | relevance | path

Searched refs:IndexError (Results 1 – 25 of 227) sorted by relevance

12345678910

/third_party/python/Lib/test/
Dtest_raise.py38 raise IndexError()
39 except IndexError as e:
42 except IndexError as exc2:
174 raise IndexError from 5
182 raise IndexError from KeyError
183 except IndexError as e:
191 raise IndexError from cause
192 except IndexError as e:
203 raise IndexError from MyException
214 raise IndexError()
[all …]
Dtest_xml_dom_minicompat.py21 with self.assertRaises(IndexError):
23 with self.assertRaises(IndexError):
54 with self.assertRaises(IndexError):
56 with self.assertRaises(IndexError):
Dlist_tests.py99 self.assertRaises(IndexError, a.__setitem__, -3, 200)
100 self.assertRaises(IndexError, a.__setitem__, 2, 200)
103 self.assertRaises(IndexError, a.__setitem__, 0, 200)
104 self.assertRaises(IndexError, a.__setitem__, -1, 200)
141 self.assertRaises(IndexError, a.__delitem__, -3)
142 self.assertRaises(IndexError, a.__delitem__, 2)
145 self.assertRaises(IndexError, a.__delitem__, 0)
299 self.assertRaises(IndexError, a.pop, 5)
302 self.assertRaises(IndexError, a.pop)
Dtest_heapq.py108 except IndexError:
127 self.assertRaises(IndexError, self.module.heapreplace, [], None)
209 with self.assertRaises(IndexError):
426 with self.assertRaises((IndexError, RuntimeError)):
433 with self.assertRaises((IndexError, RuntimeError)):
446 self.assertRaises(IndexError, self.module.heappushpop, heap, 1)
465 self.assertRaises((IndexError, RuntimeError), self.module.heappush, list1, g(1))
466 self.assertRaises((IndexError, RuntimeError), self.module.heappush, list2, h(1))
Dseq_tests.py160 self.assertRaises(IndexError, u.__getitem__, -len(u)-1)
161 self.assertRaises(IndexError, u.__getitem__, len(u))
165 self.assertRaises(IndexError, u.__getitem__, 0)
166 self.assertRaises(IndexError, u.__getitem__, -1)
175 self.assertRaises(IndexError, a.__getitem__, -3)
176 self.assertRaises(IndexError, a.__getitem__, 3)
338 self.assertRaises(IndexError, a.__getitem__, -3)
339 self.assertRaises(IndexError, a.__getitem__, 3)
Dtest_memoryview.py41 self.assertRaises(IndexError, lambda: m[6])
42 self.assertRaises(IndexError, lambda: m[-7])
43 self.assertRaises(IndexError, lambda: m[sys.maxsize])
44 self.assertRaises(IndexError, lambda: m[-sys.maxsize])
104 self.assertRaises(IndexError, setitem, 6, b"a")
105 self.assertRaises(IndexError, setitem, -7, b"a")
106 self.assertRaises(IndexError, setitem, sys.maxsize, b"a")
107 self.assertRaises(IndexError, setitem, -sys.maxsize, b"a")
Dtest_contextlib.py735 with RaiseExc(IndexError):
740 except IndexError as exc:
765 stack.callback(raise_exc, IndexError)
771 except IndexError as exc:
811 raise IndexError()
828 stack.callback(raise_exc, IndexError)
830 self.assertIsInstance(exc, IndexError)
838 stack.callback(raise_exc, IndexError)
910 except IndexError as exc:
Dtest_range.py187 with self.assertRaises(IndexError):
189 with self.assertRaises(IndexError):
205 with self.assertRaises(IndexError):
207 with self.assertRaises(IndexError):
224 with self.assertRaises(IndexError):
226 with self.assertRaises(IndexError):
243 with self.assertRaises(IndexError):
245 with self.assertRaises(IndexError):
/third_party/python/Lib/ctypes/test/
Dtest_varsize_struct.py42 self.assertRaises(IndexError, array.__setitem__, 0, None)
43 self.assertRaises(IndexError, array.__getitem__, 0)
44 self.assertRaises(IndexError, array.__setitem__, 1, None)
45 self.assertRaises(IndexError, array.__getitem__, 1)
46 self.assertRaises(IndexError, array.__setitem__, -1, None)
47 self.assertRaises(IndexError, array.__getitem__, -1)
Dtest_arrays.py33 with self.assertRaises(IndexError): ia[alen]
34 with self.assertRaises(IndexError): ia[-alen-1]
49 self.assertRaises(IndexError, int_array, *range(alen*2))
/third_party/mindspore/tests/st/pynative/
Dtest_tensor_setitem.py262 with pytest.raises(IndexError):
264 with pytest.raises(IndexError):
326 with pytest.raises(IndexError):
328 with pytest.raises(IndexError):
334 with pytest.raises(IndexError):
336 with pytest.raises(IndexError):
376 with pytest.raises(IndexError):
378 with pytest.raises(IndexError):
380 with pytest.raises(IndexError):
382 with pytest.raises(IndexError):
[all …]
Dtest_tensor_augassign.py201 with pytest.raises(IndexError):
299 with pytest.raises(IndexError):
301 with pytest.raises(IndexError):
303 with pytest.raises(IndexError):
305 with pytest.raises(IndexError):
598 with pytest.raises(IndexError):
600 with pytest.raises(IndexError):
602 with pytest.raises(IndexError):
647 with pytest.raises(IndexError):
650 with pytest.raises(IndexError):
Dtest_tensor_getitem.py301 with pytest.raises(IndexError):
307 with pytest.raises(IndexError):
340 with pytest.raises(IndexError):
479 with pytest.raises(IndexError):
700 with pytest.raises(IndexError):
994 with pytest.raises(IndexError):
1005 with pytest.raises(IndexError):
1165 with pytest.raises(IndexError):
1169 with pytest.raises(IndexError):
1177 with pytest.raises(IndexError):
[all …]
/third_party/mindspore/mindspore/ops/composite/multitype_ops/
D_constexpr_utils.py60 raise IndexError(msg)
134 raise IndexError(f'index {x} is out of bounds for dimension with size {dim_size}')
214 raise IndexError("Tensor's index cannot be None.")
219 raise IndexError("Tensor's index cannot be empty.")
222 raise IndexError(
232 raise IndexError(
290 raise IndexError(
324 … raise IndexError(f"For '{op_name}', the index elements only support 'Slice', 'Ellipsis', 'None', "
327 raise IndexError(
347 … raise IndexError("There cannot be more than one ellisis (...) in the index of the tensor, "
[all …]
/third_party/python/Lib/sqlite3/test/
Dfactory.py114 with self.assertRaises(IndexError):
116 with self.assertRaises(IndexError):
118 with self.assertRaises(IndexError):
120 with self.assertRaises(IndexError):
122 with self.assertRaises(IndexError):
124 with self.assertRaises(IndexError):
131 with self.assertRaises(IndexError):
133 with self.assertRaises(IndexError):
/third_party/boost/libs/python/test/
Dcrossmod_exception.py12 except IndexError:
16 except IndexError:
/third_party/mindspore/tests/ut/python/ops/
Dtest_tensor_slice.py510 with pytest.raises(IndexError):
521 with pytest.raises(IndexError):
691 with pytest.raises(IndexError):
695 with pytest.raises(IndexError):
703 with pytest.raises(IndexError):
705 with pytest.raises(IndexError):
708 with pytest.raises(IndexError):
710 with pytest.raises(IndexError):
1013 'block': (TensorGetItemByOneTensor(), {'exception': IndexError}),
1018 'block': (TensorGetItemByTwoTensors(), {'exception': IndexError}),
[all …]
Dtest_tensor_getitem.py119 with pytest.raises(IndexError):
155 'block': (TensorItemByItem(), {'exception': IndexError}),
159 'block': (TensorItemByItem(), {'exception': IndexError}),
171 'block': (TensorItemByItem(), {'exception': IndexError}),
/third_party/python/Lib/multiprocessing/
Dshared_memory.py373 raise IndexError("Requested position out of range.")
389 raise IndexError("Requested position out of range.")
405 raise IndexError("Requested position out of range.")
431 except IndexError:
432 raise IndexError("index out of range")
445 except IndexError:
446 raise IndexError("assignment index out of range")
/third_party/python/Lib/json/
Ddecoder.py105 except IndexError:
182 except IndexError:
195 except IndexError:
248 except IndexError:
/third_party/python/Lib/
D_collections_abc.py1029 raise IndexError
1038 except IndexError:
1069 except IndexError:
1107 raise IndexError
1111 raise IndexError
1116 raise IndexError
1127 except IndexError:
/third_party/boost/libs/python/test/numpy/
Dndarray.py91 except IndexError:
107 except IndexError:
/third_party/skia/tools/
Dmilestone.py25 except (IndexError, ValueError, AssertionError):
/third_party/flutter/skia/tools/
Dmilestone.py25 except (IndexError, ValueError, AssertionError):
/third_party/mindspore/mindspore/core/abstract/
Dprim_structures.cc173 …MS_EXCEPTION(IndexError) << op_name << " evaluator index should be an int64 number, but got " << i… in InferTupleOrListGetItem()
178 …MS_EXCEPTION(IndexError) << op_name << " evaluator index should be in range[-" << SizeToLong(nelem… in InferTupleOrListGetItem()
201 MS_EXCEPTION(IndexError) << op_name << " evaluator index should be an int64 number, but got " in InferTupleOrListSetItem()
209 …MS_EXCEPTION(IndexError) << op_name << " evaluator the index: " << idx_v << " to set out of range:… in InferTupleOrListSetItem()

12345678910