Skip to content

Commit

Permalink
Adding test for write_file wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Feb 12, 2024
1 parent e0e73ad commit 7936165
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,11 @@ def test_delete(fuel_pin_model):
assert 'mat:fuel' not in model.groups


def test_write(request, tmpdir):
test_file = str(request.path.parent / 'fuel_pin.h5m')
model = dagmc.DAGModel(test_file)
model.volumes[1].id = 12345
model.write_file('fuel_pin_copy.h5m')

model = dagmc.DAGModel('fuel_pin_copy.h5m')
assert 12345 in model.volumes

0 comments on commit 7936165

Please sign in to comment.