@@ -225,21 +225,26 @@ def test_import_export_round_trip(tmp_path: Path) -> None:
225225 nml .save (export_path )
226226 diff_files (snapshot_path , export_path )
227227
228+
228229def test_volume_dump_round_trip (tmp_path : Path ) -> None :
229- from webknossos .skeleton .nml import Volume , __dump_volume , __parse_volume
230- from loxun import XmlWriter
231230 import xml .etree .ElementTree as ET
232231
232+ from loxun import XmlWriter
233+
234+ from webknossos .skeleton .nml import Volume , __dump_volume , __parse_volume
235+
233236 export_path = tmp_path / "volume_dump.xml"
234- volume_in = Volume (id = 0 , location = "data_Volume.zip" , fallback_layer = "my_very_important_layer" )
237+ volume_in = Volume (
238+ id = 0 , location = "data_Volume.zip" , fallback_layer = "my_very_important_layer"
239+ )
235240 volume_out = None
236241
237- with open (export_path , 'wb' ) as f :
242+ with open (export_path , "wb" ) as f :
238243 with XmlWriter (f ) as xf :
239244 __dump_volume (xf , volume_in )
240245
241- with open (export_path , 'rb' ) as f :
246+ with open (export_path , "rb" ) as f :
242247 tree = ET .parse (export_path )
243248 volume_out = __parse_volume (next (tree .iter ()))
244249
245- assert volume_in == volume_out
250+ assert volume_in == volume_out
0 commit comments