Skip to content

Commit

Permalink
Remove unused fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
lochhh committed Feb 19, 2024
1 parent b82cc9f commit 82b06d9
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions tests/test_unit/test_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,6 @@ def _expected_dataarray(property):

return _expected_dataarray

@pytest.fixture
def expected_dataset(self, valid_pose_dataset):
"""Return a function to generate the expected dataset
for different kinematic properties."""

def _expected_dataset(name):
"""Return an xarray.Dataset with expected norm and
theta values."""
dims = valid_pose_dataset.pose_tracks.dims[:-1]
ds = xr.Dataset(
data_vars={
"norm": xr.DataArray(
np.full((10, 2, 2), 5.0),
dims=dims,
),
"theta": xr.DataArray(
np.full((10, 2, 2), 0.92729522),
dims=dims,
),
},
coords={
"time": valid_pose_dataset.time,
"individuals": valid_pose_dataset.individuals,
"keypoints": valid_pose_dataset.keypoints,
},
)
if name == "displacement":
# Set the first values to zero
ds.norm[0, :, :] = 0
ds.theta[0, :, :] = 0
elif name == "acceleration":
# Set all values to zero
ds.norm[:] = 0
ds.theta[:] = 0
return ds

return _expected_dataset

def test_displacement(self, valid_pose_dataset, expected_dataarray):
"""Test displacement computation."""
result = kinematics.compute_displacement(
Expand Down

0 comments on commit 82b06d9

Please sign in to comment.