MCPcopy Create free account
hub / github.com/boostorg/histogram / test_getitem

Method test_getitem

test/python_suite_test.py:396–404  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

394 self.assertEqual(str(eval(s)), s)
395
396 def test_getitem(self):
397 c = 1, 2, 3
398 a = category(*c)
399 for i in range(3):
400 self.assertEqual(a[i], c[i])
401 with self.assertRaises(IndexError):
402 a[-1]
403 with self.assertRaises(IndexError):
404 a[3]
405
406 def test_iter(self):
407 c = [1, 2, 3]

Callers

nothing calls this directly

Calls 1

categoryClass · 0.90

Tested by

no test coverage detected