def test_for(f1_2_3i4_5_6): with merge_sorted_files(f1_2_3i4_5_6) as f: actual_result = [i for i in f if i < 5] assert actual_result == [1, 2, 3, 4]
def test_file_not_found(): with pytest.raises(FileNotFoundError): with merge_sorted_files(["ggg.ty", "kkk.ru"]) as f: list(f)
def test_triple_seq_1_4_7i2_5_8i3_6_9(triple_seq): with merge_sorted_files(triple_seq) as f: actual_result = list(f) assert actual_result == [1, 2, 3, 4, 5, 6, 7, 8, 9]
def test_1_3_5i2_4_6(f1_3_5i2_4_6): with merge_sorted_files(f1_3_5i2_4_6) as f: actual_result = list(f) assert actual_result == [1, 2, 3, 4, 5, 6]
def test_equality_of_sequences_1_1_1i1_1_1(equal_sequences): with merge_sorted_files(equal_sequences) as f: actual_result = list(f) assert actual_result == [1, 1, 1, 1, 1, 1]
def test_different_lengths(different_lengths): with merge_sorted_files(different_lengths) as f: actual_result = list(f) assert actual_result == [1, 1, 1, 1, 1, 2, 3]