def test_dump_load_with_ext(data, ext): with tempfile.TemporaryDirectory() as tmpdir: file_info = DirectoryInfo(tmpdir).get_fileinfo(f'data_.{ext}') file_info.dump(data) assert data == file_info.load()
def test_dump_load_with_format(data, format, ext): with tempfile.TemporaryDirectory() as tmpdir: file_info = DirectoryInfo(tmpdir).get_fileinfo(f'data' + ext) file_info.dump(data, format) assert data == file_info.load(format)