Exemplo n.º 1
0
 def test_then_returns_same_number(self):
   assert scal_add("1") == 1
Exemplo n.º 2
0
 def test_then_includes_negatives_in_error_message(self):
   self.assertRaisesRegexp(ValueError, '.*-2.*-4.*', lambda: scal_add("-2,-4"))
Exemplo n.º 3
0
 def test_then_returns_zero(self):
   assert scal_add("") == 0
Exemplo n.º 4
0
 def test_then_the_char_afterwards_is_a_delimiter(self):
   assert scal_add("//:\n2:2") == 4
Exemplo n.º 5
0
 def test_then_raises_error(self):
   self.assertRaises(ValueError, lambda: scal_add("-2,2"))
Exemplo n.º 6
0
 def test_then_returns_sum_of_numbers(self):
   assert scal_add("3,5,8,13,21") == 50
Exemplo n.º 7
0
 def test_then_returns_sum_of_numbers(self):
   assert scal_add("3\n5,8") == 16
Exemplo n.º 8
0
 def test_then_includes_negatives_in_error_message(self):
     self.assertRaisesRegexp(ValueError, '.*-2.*-4.*',
                             lambda: scal_add("-2,-4"))
Exemplo n.º 9
0
 def test_then_returns_zero(self):
     assert scal_add("") == 0
Exemplo n.º 10
0
 def test_then_raises_error(self):
     self.assertRaises(ValueError, lambda: scal_add("-2,2"))
Exemplo n.º 11
0
 def test_then_the_char_afterwards_is_a_delimiter(self):
     assert scal_add("//:\n2:2") == 4
Exemplo n.º 12
0
 def test_then_returns_sum_of_numbers(self):
     assert scal_add("3\n5,8") == 16
Exemplo n.º 13
0
 def test_then_returns_sum_of_numbers(self):
     assert scal_add("3,5,8,13,21") == 50
Exemplo n.º 14
0
 def test_then_returns_same_number(self):
     assert scal_add("1") == 1