def setUp(self): self.obj = CT.ClassTools()
def test_format_key_1(self): result = CT.format_key("var") self.assertTrue(result == "var")
def test_format_key_3(self): result = CT.format_key("__var") self.assertTrue(result == "_var")
def test_format_print_int_1(self): result = CT.format_print(1) self.assertTrue(result == 1)
def test_format_print_int_2(self): result = CT.format_print(99999999999999999999999) self.assertTrue(result == 99999999999999999999999)
def test_format_print_float_3(self): result = CT.format_print(1.234) self.assertTrue(result == 1.23)
def test_format_print_float64_3(self): result = CT.format_print(numpy.float64(1.234)) self.assertTrue(result == 1.23)
def test_format_print_list_3(self): result = CT.format_print([numpy.zeros(2), numpy.zeros(3)]) self.assertTrue(result == ['2 x 1', '3 x 1'])
def test_format_print_ndarray_5(self): result = CT.format_print(numpy.zeros((2,2,2,2))) self.assertTrue(result == "2 x 2 x 2 x 2")
def test_format_print_ndarray_2(self): result = CT.format_print(numpy.zeros(2)) self.assertTrue(result == "2 x 1")
def test_format_print_list_2(self): result = CT.format_print([[1,1],[1,1]]) self.assertTrue(result == [[1,1],[1,1]])
def test_format_print_list_1(self): result = CT.format_print([1,2,3]) self.assertTrue(result == [1,2,3])