File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1111pytest-timeout
1212gdspy
1313memory_profiler
14+ dill
Original file line number Diff line number Diff line change 99import xarray as xr
1010import h5py
1111from dask .base import tokenize
12+ import dill as pickle
1213
1314
1415from tidy3d import *
@@ -52,6 +53,17 @@ def test_simulation_load_export_hdf5():
5253 assert SIM == SIM2 , "original and loaded simulations are not the same"
5354
5455
56+ @clear_tmp
57+ def test_simulation_load_export_pckl ():
58+
59+ path = "tests/tmp/simulation.pckl"
60+ with open (path , "wb" ) as pickle_file :
61+ pickle .dump (SIM , pickle_file )
62+ with open (path , "rb" ) as pickle_file :
63+ SIM2 = pickle .load (pickle_file )
64+ assert SIM == SIM2 , "original and loaded simulations are not the same"
65+
66+
5567@clear_tmp
5668def test_simulation_preserve_types ():
5769 """Test that all re-loaded components have the same types."""
You can’t perform that action at this time.
0 commit comments