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

Method test_init

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

Source from the content-addressed store, hash-verified

368class test_category(unittest.TestCase):
369
370 def test_init(self):
371 category(1, 2, 3)
372 category(1, 2, 3, label="ca")
373 with self.assertRaises(TypeError):
374 category()
375 with self.assertRaises(TypeError):
376 category("1")
377 with self.assertRaises(TypeError):
378 category(1, "2")
379 with self.assertRaises(TypeError):
380 category(1, 2, label=1)
381 with self.assertRaises(KeyError):
382 category(1, 2, 3, uoflow=True)
383 self.assertEqual(category(1, 2, 3),
384 category(1, 2, 3))
385
386 def test_len(self):
387 a = category(1, 2, 3)

Callers

nothing calls this directly

Calls 1

categoryClass · 0.90

Tested by

no test coverage detected