def test_string(self): with self.assertRaises(TypeError): __unit__.ensure_number('')
def test_some_object(self): with self.assertRaises(TypeError): __unit__.ensure_number(object())
def test_float__literal(self): __unit__.ensure_number(42.0)
def test_complex__ctor(self): __unit__.ensure_number(complex())
def test_long__ctor(self): __unit__.ensure_number(long())
def test_long__type(self): with self.assertRaises(TypeError): __unit__.ensure_number(long)
def test_float__ctor(self): __unit__.ensure_number(float())
def test_long__literal(self): __unit__.ensure_number(eval('42L'))
def test_int__literal(self): __unit__.ensure_number(42)
def test_int__ctor(self): __unit__.ensure_number(int())
def test_float__type(self): with self.assertRaises(TypeError): __unit__.ensure_number(float)
def test_complex__type(self): with self.assertRaises(TypeError): __unit__.ensure_number(complex)
def test_none(self): with self.assertRaises(TypeError): __unit__.ensure_number(None)