def test_parsing_one_liner_is_correct(): assert parse_dict(lines_one_word, 1, 2) == { 'lepidus, a, um [adj]': ['1. uroczy, zachwycający', '2. dowcipny, wykwintny'] }
def test_parsing_correct_number_of_words_specified_start_end(): assert len(parse_dict(lines_three_words, start=1, end=2)) == 1 assert len(parse_dict(lines_three_words, start=1, end=3)) == 2 assert len(parse_dict(lines_three_words, start=1, end=10)) == 2
def test_parsing_correct_number_of_words_default_start_specified_end(): assert len(parse_dict(lines_three_words, end=3)) == 2 assert len(parse_dict(lines_three_words, end=4)) == 3 assert len(parse_dict(lines_three_words, end=10)) == 3
def test_parsing_correct_number_of_words_default_end_specified_start(): assert len(parse_dict(lines_three_words, start=1)) == 3 assert len(parse_dict(lines_three_words, start=2)) == 2 assert len(parse_dict(lines_three_words, start=3)) == 1 assert len(parse_dict(lines_three_words, start=4)) == 0
def test_parsing_correct_number_of_words_default_start_end(): assert len(parse_dict(lines_three_words)) == 3