Skip to content

Commit

Permalink
[test_contacts.TestContactGroup.test_repframe_w_traj_violines_many_fr…
Browse files Browse the repository at this point in the history
…ames_just_runs] copy instead of link if OSError is found
  • Loading branch information
gph82 committed Jun 24, 2024
1 parent 06a16c6 commit ee07b2d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,12 @@ def test_repframe_maxima(self):
def test_repframe_w_traj_violines_many_frames_just_runs(self):
CG = examples.ContactGroupL394()
with _TDir(suffix="_mdciao_example_CG") as t:
examples.examples._link(test_filenames.traj_xtc,
examples.examples._path.join(t, examples.examples._path.basename(test_filenames.traj_xtc)))
try:
examples.examples._link(test_filenames.traj_xtc,
examples.examples._path.join(t, examples.examples._path.basename(test_filenames.traj_xtc)))
except OSError:
examples.examples._shcopy(test_filenames.traj_xtc,
examples.examples._path.join(t, examples.examples._path.basename(test_filenames.traj_xtc)))
with examples.examples.remember_cwd():
examples.examples._chdir(t)
repframes, RMSDd, values, trajs = CG.repframes(show_violins=True, return_traj=True, n_frames=10)
Expand Down

0 comments on commit ee07b2d

Please sign in to comment.