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

Method test_init

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

Source from the content-addressed store, hash-verified

163class test_circular(unittest.TestCase):
164
165 def test_init(self):
166 circular(1)
167 circular(4, 1.0)
168 circular(4, 1.0, label="pa")
169 with self.assertRaises(TypeError):
170 circular()
171 with self.assertRaises(Exception):
172 circular(-1)
173 with self.assertRaises(TypeError):
174 circular(4, 1.0, uoflow=True)
175 with self.assertRaises(TypeError):
176 circular(1, 1.0, 2.0, 3.0)
177 with self.assertRaises(TypeError):
178 circular(1, 1.0, label=1)
179 with self.assertRaises(TypeError):
180 circular("1")
181 a = circular(4, 1.0)
182 self.assertEqual(a, circular(4, 1.0))
183 self.assertNotEqual(a, circular(2, 1.0))
184 self.assertNotEqual(a, circular(4, 0.0))
185
186 def test_len(self):
187 self.assertEqual(len(circular(4)), 4)

Callers

nothing calls this directly

Calls 1

circularClass · 0.90

Tested by

no test coverage detected