@@ -381,22 +381,22 @@ def test_values():
381
381
array = c3d ["data" ]["points" ]
382
382
decimal = 6
383
383
384
- np .testing .assert_array_equal (x = array .shape , y = (4 , 51 , 580 ), err_msg = "Shape does not match" )
384
+ np .testing .assert_array_equal (actual = array .shape , desired = (4 , 51 , 580 ), err_msg = "Shape does not match" )
385
385
raveled = array .ravel ()
386
386
np .testing .assert_array_almost_equal (
387
- x = raveled [0 ],
388
- y = 44.16278839111328 ,
387
+ actual = raveled [0 ],
388
+ desired = 44.16278839111328 ,
389
389
decimal = decimal ,
390
390
)
391
391
np .testing .assert_array_almost_equal (
392
- x = raveled [- 1 ],
393
- y = 1.0 ,
392
+ actual = raveled [- 1 ],
393
+ desired = 1.0 ,
394
394
decimal = decimal ,
395
395
)
396
- np .testing .assert_array_almost_equal (x = np .nanmean (array ), y = 362.2979849093196 , decimal = decimal )
397
- np .testing .assert_array_almost_equal (x = np .nanmedian (array ), y = 337.7519226074219 , decimal = decimal )
396
+ np .testing .assert_array_almost_equal (actual = np .nanmean (array ), desired = 362.2979849093196 , decimal = decimal )
397
+ np .testing .assert_array_almost_equal (actual = np .nanmedian (array ), desired = 337.7519226074219 , decimal = decimal )
398
398
np .testing .assert_allclose (actual = np .nansum (array ), desired = 42535594.91827867 , rtol = 0.05 )
399
- np .testing .assert_array_equal (x = np .isnan (array ).sum (), y = 915 )
399
+ np .testing .assert_array_equal (actual = np .isnan (array ).sum (), desired = 915 )
400
400
401
401
402
402
def test_force_platform_filter ():
@@ -465,19 +465,19 @@ def test_rotations():
465
465
array = c3d ["data" ]["rotations" ]
466
466
decimal = 6
467
467
468
- np .testing .assert_array_equal (x = array .shape , y = (4 , 4 , 21 , 340 ), err_msg = "Shape does not match" )
468
+ np .testing .assert_array_equal (actual = array .shape , desired = (4 , 4 , 21 , 340 ), err_msg = "Shape does not match" )
469
469
raveled = array .ravel ()
470
470
np .testing .assert_array_almost_equal (
471
- x = array [2 , 3 , 2 , 5 ],
472
- y = 931.6382446289062 ,
471
+ actual = array [2 , 3 , 2 , 5 ],
472
+ desired = 931.6382446289062 ,
473
473
decimal = decimal ,
474
474
)
475
475
np .testing .assert_array_almost_equal (
476
- x = raveled [- 1 ],
477
- y = 1.0 ,
476
+ actual = raveled [- 1 ],
477
+ desired = 1.0 ,
478
478
decimal = decimal ,
479
479
)
480
- np .testing .assert_array_almost_equal (x = np .nansum (array ), y = 9367125.137371363 , decimal = decimal )
480
+ np .testing .assert_array_almost_equal (actual = np .nansum (array ), desired = 9367125.137371363 , decimal = decimal )
481
481
482
482
483
483
@pytest .fixture (scope = "module" , params = ["BTS" , "Optotrak" , "Qualisys" , "Vicon" , "Label2" ])
@@ -540,10 +540,13 @@ def test_parse_and_rebuild_parameters(c3d_build_rebuild_reduced):
540
540
continue
541
541
542
542
try :
543
+ if orig .parameters [group_key ][param_key ]['type' ] != rebuilt .parameters [group_key ][param_key ]['type' ]:
544
+ print (f"Type mismatch for { group_key } - { param_key } " )
545
+
543
546
assert orig .parameters [group_key ][param_key ]['type' ] == rebuilt .parameters [group_key ][param_key ]['type' ]
544
547
except :
545
548
# Type may differ for empty values
546
- if not orig .parameters [group_key ][param_key ]['value' ] and not rebuilt .parameters [group_key ][param_key ]['value' ]:
549
+ if orig .parameters [group_key ][param_key ]['value' ]. any () == rebuilt .parameters [group_key ][param_key ]['value' ]. any () == False :
547
550
pass
548
551
else :
549
552
assert orig .parameters [group_key ][param_key ]['type' ] == rebuilt .parameters [group_key ][param_key ]['type' ]
0 commit comments