def test_time_reversal_asymmetry_statistic(self):
        x = [1] * 10
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 0
        )
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 1
        )
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 2
        )
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 3
        )

        x = [1, 2, -3, 4]
        # 1/2 * ( (4^2 * -3 + 3 * 2^2) + (3^2*2)-(2*1^1)) = 1/2 * (-48+12+18-2) = 20/2
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, -10, 1
        )
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 2
        )
        self.assertAlmostEqualOnAllArrayTypes(
            time_reversal_asymmetry_statistic, x, 0, 3
        )