Exemplo n.º 1
0
 def test_multi_digit_numbers(self):
     ret = strategy_human_parse('100500, 1337')
     self.assertEqual(ret, (100499, 1336))
Exemplo n.º 2
0
 def test_strategy_human_parse(self):
     ret = strategy_human_parse('1, 1')
     self.assertEqual(ret, (0, 0))
Exemplo n.º 3
0
 def test_trailing_spaces(self):
     ret = strategy_human_parse('2, 3    ')
     self.assertEqual(ret, (1, 2))
Exemplo n.º 4
0
 def test_no_numbers(self):
     with self.assertRaises(ValueError):
         ret = strategy_human_parse('middle, top')
Exemplo n.º 5
0
 def test_more_than_one_comma(self):
     with self.assertRaises(ValueError):
         ret = strategy_human_parse('1,2,3')
Exemplo n.º 6
0
 def test_no_comma(self):
     with self.assertRaises(ValueError):
         ret = strategy_human_parse('21')
Exemplo n.º 7
0
 def test_a_lot_of_spaces(self):
     ret = strategy_human_parse('2,   \t5')
     self.assertEqual(ret, (1, 4))