pommes.tests.test_io

Functions

assert_h5_bitshuffle_zstd(path)

Check that every dataset in the HDF5 file uses the Bitshuffle + Zstd filter.

test_save_solution(parameters, tmp_path)

test_save_input_without_csv_writes_no_csv(parameters, ...)

export_csv=False keeps input.nc but no CSV copy of it (#92).

test_save_compressed_solution(parameters, tmp_path)

test_the_catalogue_travels_with_the_solution(...)

The catalogue is saved three ways and read back (#151).

test_a_model_without_catalogue_saves_none(tmp_path)

A plain linopy model is saved as before, with no catalogue.json.

Module Contents

pommes.tests.test_io.assert_h5_bitshuffle_zstd(path)

Check that every dataset in the HDF5 file uses the Bitshuffle + Zstd filter.

pommes.tests.test_io.test_save_solution(parameters, tmp_path)
pommes.tests.test_io.test_save_input_without_csv_writes_no_csv(parameters, tmp_path)

export_csv=False keeps input.nc but no CSV copy of it (#92).

pommes.tests.test_io.test_save_compressed_solution(parameters, tmp_path)
pommes.tests.test_io.test_the_catalogue_travels_with_the_solution(parameters, tmp_path)

The catalogue is saved three ways and read back (#151).

solution.nc carries it, catalogue.json holds it, read_solution puts it back on the dataset it reads from the CSV files.

pommes.tests.test_io.test_a_model_without_catalogue_saves_none(tmp_path)

A plain linopy model is saved as before, with no catalogue.json.