Exemplo n.º 1
0
 def test_parse_position_input_fail_missing_dash():
     assert parse_position_input("10 21,32,43") is None
Exemplo n.º 2
0
 def test_parse_position_input_fail_missing_range_end():
     assert parse_position_input("10 -") is None
Exemplo n.º 3
0
 def test_parse_position_input_fail_empty_string():
     assert parse_position_input("") is None
Exemplo n.º 4
0
 def test_parse_position_input_fail_missing_comma():
     assert parse_position_input("10,21,32 43") is None
Exemplo n.º 5
0
 def test_parse_position_sorted_output():
     unsorted_positions = '10, 32, 21, 43'
     assert parse_position_input(unsorted_positions) == [10, 21, 32, 43]
Exemplo n.º 6
0
 def test_parse_position_with_period():
     assert parse_position_input('10. 32. 21. 43') is None
Exemplo n.º 7
0
 def test_parse_position_input_test_5():
     positions5 = "10-21"
     assert parse_position_input(positions5) == [
         10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
     ]
Exemplo n.º 8
0
 def test_parse_position_input_test_4():
     positions4 = "10 - 21, 32, 43"
     assert parse_position_input(positions4) == [
         10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 32, 43
     ]
Exemplo n.º 9
0
 def test_parse_position_input_3():
     positions3 = "10-16"
     assert parse_position_input(positions3) == [
         10, 11, 12, 13, 14, 15, 16
     ]
Exemplo n.º 10
0
 def test_parse_position_input_2():
     positions2 = '10,21,32,43'
     assert parse_position_input(positions2) == [10, 21, 32, 43]
Exemplo n.º 11
0
 def test_parse_position_input_1():
     positions1 = '10, 21, 32, 43'
     assert parse_position_input(positions1) == [10, 21, 32, 43]