コード例 #1
0
 def test_empty_string(self):
     text = ''
     strokes = reverse_lookup(text)
     assert strokes == []
コード例 #2
0
 def test_non_sequential_number(self):
     text = '18302'
     strokes = reverse_lookup(text)
     assert strokes == []
コード例 #3
0
 def test_max_number_reverse(self):
     text = '0987654321'
     strokes = reverse_lookup(text)
     assert strokes == [('12345*67890', )]
コード例 #4
0
 def test_separated_numbers(self):
     text = '12347'
     strokes = reverse_lookup(text)
     assert strokes == [('1234-7', )]
コード例 #5
0
 def test_max_number(self):
     text = '123456780'
     strokes = reverse_lookup(text)
     assert strokes == [('12345-67890', )]
コード例 #6
0
 def test_ends_with_zero(self):
     text = '2590'
     strokes = reverse_lookup(text)
     assert strokes == [('25-90', )]
コード例 #7
0
 def test_starts_with_zero(self):
     text = '0631'
     strokes = reverse_lookup(text)
     assert strokes == [('13*60', )]
コード例 #8
0
 def test_decreasing_number(self):
     text = '872'
     strokes = reverse_lookup(text)
     assert strokes == [('2*78', )]
コード例 #9
0
 def test_increasing_number(self):
     text = '13'
     strokes = reverse_lookup(text)
     assert strokes == [('13', )]