Exemplo n.º 1
0
 def test_line18(self):  #   Output should match input
     self.assertEqual(add_rows(self.line18), [
         0,
         0,
         1,
         3,
         6,
     ])
Exemplo n.º 2
0
 def test_line24(self):  #   Negative first element
     self.assertEqual(add_rows(self.line24), [
         0,
         0,
         15,
         5,
         30,
         20,
         50,
     ])
Exemplo n.º 3
0
 def test_line36(self):
     self.assertEqual(add_rows(self.line36), [
         0,
         0,
         0.17,
         -0.13,
         -1.23,
         -2.26,
         -2.86,
         -4.16,
         -6.56,
     ])
Exemplo n.º 4
0
 def test_line48(self):
     self.assertEqual(add_rows(self.line48), [
         0,
         0,
         0.1,
         -0.50,
         -1.93,
         -2.69,
         -2.52,
         -2.45,
         -1.58,
         -1.08,
         -0.34,
     ])
Exemplo n.º 5
0
 def test_line144(self):
     self.assertEqual(add_rows(self.line144), [
         0,
         0,
         1,
         3,
         6,
         10,
         15,
         21,
         28,
         36,
         45,
         55,
         66,
         78,
         91,
         105,
         120,
         136,
         153,
         171,
         190,
         210,
         231,
         253,
         276,
         300,
         325,
         351,
         378,
         406,
         435,
         465,
         496,
         528,
         561,
         595,
         630,
         666,
         703,
     ])
Exemplo n.º 6
0
 def test_line72(self):
     self.assertEqual(add_rows(self.line72), [
         0,
         0,
         10,
         30,
         60,
         100,
         150,
         210,
         280,
         360,
         450,
         550,
         670,
         810,
         970,
         1150,
         1350,
     ])
Exemplo n.º 7
0
 def test_line12(self):  #   Minimum number of measurements
     self.assertEqual(add_rows(self.line12), [
         0,
         0,
         -0.90,
     ])