Ejemplo n.º 1
0
 def test_1(self):
     l1 = [1, 2, 3, 4]
     l2 = map.square_all(l1)
     self.assertListAlmostEqual(l2, [1, 4, 9, 16])
     l1 = [5, 6, 7, 8]
     l2 = map.square_all(l1)
     self.assertListAlmostEqual(l2, [25, 36, 49, 64])
Ejemplo n.º 2
0
 def test_1(self):
     # Add code here.
     #list1 = [0, 0, 0]
     #list2 = [3, 4, 6]
     #list3 = map.square_all(list1, list2)
     #self.assertListAlmostEqual(list3, [3, 5, 6])
     list1 = [2, 3, 4]
     list2 = map.square_all(list1)
     self.assertListAlmostEqual(list2, [4, 9, 16])
Ejemplo n.º 3
0
 def test_2(self):
     t = [-1, -2, -3, -4, -5]
     self.assertEqual(map.square_all(t), [1, 4, 9, 16, 25])
Ejemplo n.º 4
0
 def test_1(self):
     t = [1, 2, 3, 4, 5]
     self.assertEqual(map.square_all(t), [1, 4, 9, 16, 25])
Ejemplo n.º 5
0
 def test_square_all_1(self):
     iList = [1, 3, 5]
     oList = [1, 9, 25]
     self.assertListEqual(map.square_all(iList), oList)
Ejemplo n.º 6
0
 def test_square_all_2(self):
     input_list = [-2, -1, 0, 1, 2]
     self.assertListEqual(map.square_all(input_list), [4, 1, 0, 1, 4])
Ejemplo n.º 7
0
 def test_square_all1(self):
     numb_list = [2, 3, 4, 5]
     new_list = [4, 9, 16, 25]
     self.assertEqual(map.square_all(numb_list), new_list)
Ejemplo n.º 8
0
 def test_square_3(self):
     list1 = [2.3, 5, 7.1]
     list2 = map.square_all(list1)
     self.assertListAlmostEqual(list2, [5.29, 25, 50.41])
Ejemplo n.º 9
0
 def test_square_all_2(self):
    list_sqaured = map.square_all([-2,3,4])
    self.assertEqual(list_sqaured, [4,9,16])
Ejemplo n.º 10
0
 def test_square_all(self):
    list_squared = map.square_all([1,2,3])
    self.assertEqual(list_squared, [1,4,9])
Ejemplo n.º 11
0
 def test_square_all1(self):
     list = [1,2,3,4]
     map.square_all(list)
     list.__eq__([1,4,9,16])
Ejemplo n.º 12
0
 def test_square_all2(self):
     list = [5,7,8,1,3,5,6,7]
     map.square_all(list)
     list.__eq__([25,49,64,1,9,25,36,49])
     pass
Ejemplo n.º 13
0
 def test_square2(self):
     self.assertEqual(map.square_all([-1, -2, -3, -4, -5]),
                      [1, 4, 9, 16, 25])
Ejemplo n.º 14
0
 def test_square(self):
     self.assertEqual(map.square_all([1, 2, 3, 4, 5]), [1, 4, 9, 16, 25])
Ejemplo n.º 15
0
 def test_square_all(self):
     list1 = [2, 3, 4]
     list2 = [5, 6, 7]
     self.assertListEqual(map.square_all(list1), [4, 9, 16])
     self.assertListEqual(map.square_all(list2), [25, 36, 49])
Ejemplo n.º 16
0
 def test_square_all_1(self):
     nums = [2, 4, 6, 8]
     squares = map.square_all(nums)
     self.assertListAlmostEqual(squares, [4, 16, 36, 64]) 
Ejemplo n.º 17
0
 def test_square_all_2(self):
     nums = [1, 0, 10, 7]
     squares = map.square_all(nums)
     self.assertListAlmostEqual(squares, [1, 0, 100, 49])
Ejemplo n.º 18
0
 def test_2(self):
     x = [-1, 3, 4]
     self.assertAlmostEqual(map.square_all(x), [1, 9, 16])
Ejemplo n.º 19
0
 def test_square_2(self):
     list1 = [1, 10, 2]
     list2 = map.square_all(list1)
     self.assertListAlmostEqual(list2, [1, 100, 4])
Ejemplo n.º 20
0
 def test_1(self):
     x = [1, 4, 5]
     self.assertAlmostEqual(map.square_all(x), [1, 16, 25])
Ejemplo n.º 21
0
 def test_square_all2(self):
     numb_list = [.5, 6, 2, 11, 10]
     new_list = [0.25, 36, 4, 121, 100]
     self.assertEqual(map.square_all(numb_list), new_list)
Ejemplo n.º 22
0
 def test_square_all_1(self):
     l1 = map.square_all([0.0, 1.0, 2.0])
     l2 = [0.0, 1.0, 4.0]
     self.assertListAlmostEqual(l1, l2)
Ejemplo n.º 23
0
 def test_square_all_1(self):
     input_list = [1, 2, 3]
     self.assertListEqual(map.square_all(input_list), [1, 4, 9])
Ejemplo n.º 24
0
 def test_square_all_2(self):
     l1 = map.square_all([-1.0, 0.0, 1.0])
     l2 = [1.0, 0.0, 1.0]
     self.assertListAlmostEqual(l1, l2)
Ejemplo n.º 25
0
 def test_square_all(self):
    self.assertAlmostEqual(map.square_all(test1), test2)
    self.assertAlmostEqual(map.square_all(test3), test4)
Ejemplo n.º 26
0
 def test_square_all_2(self):
     iList = [-3, 0, 10]
     oList = [9, 0, 100]
     self.assertListEqual(map.square_all(iList), oList)