(self, nsteps)
| 14 | @pytest.mark.parametrize("nsteps", [1, 4]) |
| 15 | class TestClass: |
| 16 | def test_dyn(self, nsteps): |
| 17 | import example_problem as ep |
| 18 | |
| 19 | dyn_data = ep.dyn_model.createData() |
| 20 | assert isinstance(dyn_data, ep.TwistData) |
| 21 | dyn_data.Jx[:, :] = np.arange(ep.ndx**2).reshape(ep.ndx, ep.ndx) |
| 22 | dyn_data.Ju[:, :] = np.arange(ep.ndx**2, ep.ndx**2 + ep.ndx * ep.nu).reshape( |
| 23 | ep.ndx, ep.nu |
| 24 | ) |
| 25 | ep.dyn_model.forward(ep.x0, ep.u0, dyn_data) |
| 26 | ep.dyn_model.dForward(ep.x0, ep.u0, dyn_data) |
| 27 | print(ep.stage_model.dynamics) |
| 28 | assert isinstance(ep.stage_model.dynamics, ep.TwistModelExplicit) |
| 29 | |
| 30 | def test_cost(self, nsteps): |
| 31 | import example_problem as ep |
nothing calls this directly
no test coverage detected