Skip to content

Commit

Permalink
chore(test): #83 more strict test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmp0xff committed Sep 1, 2024
1 parent d760c83 commit 52fcd63
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/models/kepler_problem/test_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

from hamilflow.models.kepler_problem.dynamics import (
_tau_of_1_plus_u_hyperbolic,
_tau_of_e_minus_u_elliptic,
_tau_of_e_minus_u_hyperbolic,
_tau_of_e_plus_u_elliptic,
_tau_of_u_exact_elliptic,
_tau_of_u_exact_hyperbolic,
tau_of_e_minus_u_elliptic,
tau_of_e_plus_u_elliptic,
tau_of_u_exact_elliptic,
tau_of_u_prime,
)

Expand Down Expand Up @@ -70,7 +70,7 @@ def integrand(u: "npt.ArrayLike") -> "npt.ArrayLike":
def exact_and_approx_tau_s(
self,
ecc: float,
) -> "tuple[Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]], Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]], Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]]]":
) -> """tuple[Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]], Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]], Callable[[float, npt.NDArray[np.float64]], npt.NDArray[np.float64]]]""":
"""Give approximate and exact solutions for the elliptic and hyperbolic cases.
The exact solutions have removable singularities at the boundary of domain,
Expand All @@ -81,9 +81,9 @@ def exact_and_approx_tau_s(
pytest.skip(f"{c} case is exact")
elif 0 < ecc < 1:
return (
_tau_of_u_exact_elliptic,
_tau_of_e_plus_u_elliptic,
_tau_of_e_minus_u_elliptic,
tau_of_u_exact_elliptic,
tau_of_e_plus_u_elliptic,
tau_of_e_minus_u_elliptic,
)
elif ecc > 1:
return (
Expand All @@ -94,7 +94,7 @@ def exact_and_approx_tau_s(
else:
raise ValueError(f"Expect ecc >= 0, got {ecc}")

@pytest.mark.parametrize("epsilon", [1e-7])
@pytest.mark.parametrize("epsilon", [3e-7])
def test_expansion(
self,
ecc: float,
Expand Down

0 comments on commit 52fcd63

Please sign in to comment.