Skip to content

Commit d1d038d

Browse files
[Newton] Deep-copy SIM_CFGs in sim fixture
SIM_CFGs is module-level, so without a copy those mutations persisted across parametrize cases Signed-off-by: aravind s kumar <aravikumar@nvidia.com>
1 parent a51e563 commit d1d038d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

source/isaaclab_newton/test/assets/test_articulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"""Rest everything follows."""
1919

2020
import sys
21+
from copy import deepcopy
2122

2223
import pytest
2324
import torch
@@ -465,7 +466,7 @@ def sim(request):
465466
else:
466467
add_ground_plane = False # default to no ground plane
467468
articulation_type = request.getfixturevalue("articulation_type")
468-
sim_cfg = SIM_CFGs[articulation_type]
469+
sim_cfg = deepcopy(SIM_CFGs[articulation_type])
469470
sim_cfg.device = device
470471
# ``gravity_enabled`` is silently ignored by ``build_simulation_context``
471472
# when an explicit ``sim_cfg`` is also passed; apply it here so the

0 commit comments

Comments
 (0)