def test_hfloat(self): self.assertEqual(str(debug.hfloat(10, 5)), '10') self.assertEqual(str(debug.hfloat(10.45645234234, 5)), '10.456')
def test_hfloat(f, precision, expected): assert str(debug.hfloat(f, precision)) == expected