import csv


def mktestfile(tmpdir):
    """Creates test file for unit testing in tmpdir.

    :returns: string path of testFile
    """
    testFile = tmpdir.join('test.csv')
    testPath = testFile.strpath
    with open(testPath, 'w', newline='') as csvfile:
        testWriter = csv.writer(csvfile)
        testWriter.writerow(['0.11', '0.88'])
        testWriter.writerow(['0.22', '0.99'])
    return testPath