diff --git a/source/tests/common/test_out_stat.py b/source/tests/common/test_out_stat.py index a1df97b9bb..253872361c 100644 --- a/source/tests/common/test_out_stat.py +++ b/source/tests/common/test_out_stat.py @@ -91,7 +91,13 @@ def test_compute_stats_from_redu_with_assigned_bias(self) -> None: ) def test_compute_stats_property(self) -> None: + """Test compute_stats_property function with various scenarios.""" bias, std = compute_stats_property(self.output_redu, self.natoms) + # Test shapes + assert bias.shape == (len(self.mean), self.output_redu.shape[1]) + assert std.shape == (self.output_redu.shape[1],) + + # Test values for fake_atom_bias in bias: np.testing.assert_allclose( fake_atom_bias, np.mean(self.output_redu, axis=0), rtol=1e-7