new data copy test
This commit is contained in:
@@ -116,6 +116,20 @@ def test_overwrite(tmp_path: Path):
|
|||||||
assert len(zpath.read_bytes()) == len(orig_file)
|
assert len(zpath.read_bytes()) == len(orig_file)
|
||||||
|
|
||||||
|
|
||||||
|
def test_zip_data_copy(tmp_path: Path):
|
||||||
|
new_disp_path = Path("./tests/data/PM2000D_2 extrapolated 4 0.npz")
|
||||||
|
new_aeff_path = Path("./tests/data/PM2000D_A_eff_marcuse.npz")
|
||||||
|
params = Parameters(
|
||||||
|
**(PARAMS | dict(dispersion_file=new_disp_path, effective_area_file=new_aeff_path))
|
||||||
|
)
|
||||||
|
_ = propagation(tmp_path / "file.zip", params, bundle_data=True)
|
||||||
|
|
||||||
|
prop = propagation(tmp_path / "file.zip")
|
||||||
|
|
||||||
|
assert prop.parameters.effective_area_file.load_data() == new_aeff_path.read_bytes()
|
||||||
|
assert prop.parameters.dispersion_file.load_data() == new_disp_path.read_bytes()
|
||||||
|
|
||||||
|
|
||||||
def test_zip_bundle(tmp_path: Path):
|
def test_zip_bundle(tmp_path: Path):
|
||||||
params = Parameters(**PARAMS)
|
params = Parameters(**PARAMS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user