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

Method test_ops

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

Source from the content-addressed store, hash-verified

420 self.assertEqual(tuple(elem), (1, 2))
421
422 def test_ops(self):
423 a = histogram.element(1, 2)
424 b = histogram.element(2, 1)
425 self.assertNotEqual(a, b)
426 self.assertEqual(a + b, histogram.element(3, 3))
427 self.assertEqual(a + 1, histogram.element(2, 3))
428 self.assertEqual(1 + a, histogram.element(2, 3))
429 self.assertEqual(a + 2, histogram.element(3, 4))
430
431 def test_repr(self):
432 elem = histogram.element(1, 2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected