@@ -46,44 +46,6 @@ def _expected_dataarray(property):
46
46
47
47
return _expected_dataarray
48
48
49
- @pytest .fixture
50
- def expected_dataset (self , valid_pose_dataset ):
51
- """Return a function to generate the expected dataset
52
- for different kinematic properties."""
53
-
54
- def _expected_dataset (name ):
55
- """Return an xarray.Dataset with expected norm and
56
- theta values."""
57
- dims = valid_pose_dataset .pose_tracks .dims [:- 1 ]
58
- ds = xr .Dataset (
59
- data_vars = {
60
- "norm" : xr .DataArray (
61
- np .full ((10 , 2 , 2 ), 5.0 ),
62
- dims = dims ,
63
- ),
64
- "theta" : xr .DataArray (
65
- np .full ((10 , 2 , 2 ), 0.92729522 ),
66
- dims = dims ,
67
- ),
68
- },
69
- coords = {
70
- "time" : valid_pose_dataset .time ,
71
- "individuals" : valid_pose_dataset .individuals ,
72
- "keypoints" : valid_pose_dataset .keypoints ,
73
- },
74
- )
75
- if name == "displacement" :
76
- # Set the first values to zero
77
- ds .norm [0 , :, :] = 0
78
- ds .theta [0 , :, :] = 0
79
- elif name == "acceleration" :
80
- # Set all values to zero
81
- ds .norm [:] = 0
82
- ds .theta [:] = 0
83
- return ds
84
-
85
- return _expected_dataset
86
-
87
49
def test_displacement (self , valid_pose_dataset , expected_dataarray ):
88
50
"""Test displacement computation."""
89
51
result = kinematics .compute_displacement (
0 commit comments