@contextmanager
def make_file(contents, suffix, decompress=False):
    if decompress:
        contents = zlib.decompress(contents)

    try:
        _, fname = tempfile.mkstemp(suffix=suffix)
        with open(fname, 'wb') as outfile:
            outfile.write(contents)
        yield fname
    finally:
        try:
            os.unlink(fname)
        except WindowsError:  # on Windows the unlink can fail
            pass
Has built-in standard set of page-size options.
dataset/ETHPy150Open glue-viz/glue/glue/tests/helpers.py/make_file--crossover with--dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_pagination.py/TestPager.test_sizes_with_standard_size