Example #1
0
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()
Example #2
0
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)