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

Method test_growth

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

Source from the content-addressed store, hash-verified

504 self.assertEqual(get(h, 3).value, 1)
505
506 def test_growth(self):
507 h = histogram(integer(-1, 2))
508 h(-1)
509 h(1)
510 h(1)
511 for i in range(255):
512 h(0)
513 h(0)
514 for i in range(1000 - 256):
515 h(0)
516 self.assertEqual(h.at(-1).value, 0)
517 self.assertEqual(h.at(0).value, 1)
518 self.assertEqual(h.at(1).value, 1000)
519 self.assertEqual(h.at(2).value, 2)
520 self.assertEqual(h.at(3).value, 0)
521
522 def test_fill_2d(self):
523 for uoflow in (False, True):

Callers

nothing calls this directly

Calls 3

integerClass · 0.90
atMethod · 0.80
histogramClass · 0.50

Tested by

no test coverage detected