def test_get_marker_position_small(self): tb = TimeBar(100, 10) assert tb.get_marker_postion(0) == 0 assert tb.get_marker_postion(1) == 0 assert tb.get_marker_postion(10) == 1 assert tb.get_marker_postion(20) == 2 assert tb.get_marker_postion(30) == 2 assert tb.get_marker_postion(40) == 3 assert tb.get_marker_postion(50) == 4 assert tb.get_marker_postion(99) == 8 assert tb.get_marker_postion(100) == 8
def test_get_marker_position_harder(self): tb = TimeBar(100, 100) assert tb.get_marker_postion(0) == 0 assert tb.get_marker_postion(1) == 1 assert tb.get_marker_postion(10) == 10 assert tb.get_marker_postion(20) == 20 assert tb.get_marker_postion(30) == 29 assert tb.get_marker_postion(40) == 39 assert tb.get_marker_postion(50) == 49 assert tb.get_marker_postion(99) == 97 assert tb.get_marker_postion(100) == 98
def test_get_marker_position_easy(self): tb = TimeBar(100, 102) assert tb.get_marker_postion(0) == 0 assert tb.get_marker_postion(1) == 1 assert tb.get_marker_postion(10) == 10 assert tb.get_marker_postion(20) == 20 assert tb.get_marker_postion(30) == 30 assert tb.get_marker_postion(40) == 40 assert tb.get_marker_postion(50) == 50 assert tb.get_marker_postion(99) == 99 assert tb.get_marker_postion(100) == 100