@pytest.yield_fixture(scope='session', params=["zeros", "random"])
def testdata(request, tmpdir_factory):
    count, size = 10, 1000*1000
    p = tmpdir_factory.mktemp('data')
    data_type = request.param
    if data_type == 'zeros':
        # do not use a binary zero (\0) to avoid sparse detection
        def data(size):
            return b'0' * size
    if data_type == 'random':
        def data(size):
            return os.urandom(size)
    for i in range(count):
        with open(str(p.join(str(i))), "wb") as f:
            f.write(data(size))
    yield str(p)
    p.remove(rec=1)
dataset/ETHPy150Open borgbackup/borg/borg/testsuite/benchmark.py/testdata/original