Skip to content

Commit

Permalink
fix jacobian matrix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt-Brunner committed Dec 9, 2024
1 parent 3bba7ad commit 146dcbf
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/core/delta_tau_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
from unittest.mock import MagicMock, patch
import numpy as np







def set_up_mocks() -> (MagicMock, MagicMock, MagicMock):
polynomial_module_mock = MagicMock()
polynomial_module_mock.polynomial_sum_at_measuring_times = MagicMock()
Expand All @@ -24,7 +18,7 @@ def test_canCalculateJacobianMatrixOutOfTimesAndCoefficients(self):
polynomial_module_mock, zeros_mock, numpy_module_mock = set_up_mocks()

zeros_mock.return_value = np.zeros((3, 2))
polynomial_module_mock.side_effect = [6, 3, 2, 1]
polynomial_module_mock.polynomial_sum_at_measuring_times.side_effect = [6, 3, 2, 1]

with patch.dict(
"sys.modules",
Expand All @@ -42,11 +36,6 @@ def test_canCalculateJacobianMatrixOutOfTimesAndCoefficients(self):
[3e8,1e8],
[3e8,1e8]])






np.testing.assert_array_equal(calculate_jacobian_matrix(times, coefficients),jacobian_matrix)


Expand Down

0 comments on commit 146dcbf

Please sign in to comment.