def input_file(tmpdir_factory):
    """Generate a temporary file used for testing the parse_file method."""
    rows = [('81 : (1,53.38,€45) (2,88.62,€98) (3,78.48,€3) (4,72.30,€76) '
             '(5,30.18,€9) (6,46.34,€48)'), '8 : (1,15.3,€34)',
            ('75 : (1,85.31,€29) (2,14.55,€74) (3,3.98,€16) (4,26.24,€55) '
             '(5,63.69,€52) (6,76.25,€75) (7,60.02,€74) (8,93.18,€35) '
             '(9,89.95,€78)'),
            ('56 : (1,90.72,€13) (2,33.80,€40) (3,43.15,€10) (4,37.97,€16) '
             '(5,46.81,€36) (6,48.77,€79) (7,81.80,€45) (8,19.36,€79) '
             '(9,6.76,€64)')]

    expected = [(8100,
                 ((1, 5338, 45), (2, 8862, 98), (3, 7848, 3), (4, 7230, 76),
                  (5, 3018, 9), (6, 4634, 48))), (800, ((1, 1530, 34), )),
                (7500, ((1, 8531, 29), (2, 1455, 74), (3, 398, 16),
                        (4, 2624, 55), (5, 6369, 52), (6, 7625, 75),
                        (7, 6002, 74), (8, 9318, 35), (9, 8995, 78))),
                (5600, ((1, 9072, 13), (2, 3379, 40), (3, 4315, 10),
                        (4, 3797, 16), (5, 4681, 36), (6, 4877, 79),
                        (7, 8180, 45), (8, 1936, 79), (9, 676, 64)))]

    p = tmpdir_factory.mktemp('input_data').join('input_file')

    with open(p, 'w+') as file:
        for row in rows:
            print(row, file=file)

    return (p, expected)