-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Probably something changed again in pytest-dev . Just started seeing this today. I restarted a previously passing job on main and it fails now: https://github.com/astropy/astropy/actions/runs/7780284592/job/21375925091
All failures are similar in nature as this:
> with pytest.warns(IllegalMinuteWarning):
astropy/coordinates/tests/test_angles.py:495:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrn = <warnings.WarningMessage object at 0x7fc1da718650>
@staticmethod
def _validate_message(wrn: Any) -> None:
if not isinstance(msg := wrn.message.args[0], str):
> raise TypeError(
f"Warning message must be str, got {msg!r} (type {type(msg).__name__})"
)
E TypeError: Warning message must be str, got 60 (type int)
_pytest/recwarn.py:340: TypeError
FAILED coordinates/tests/test_angles.py::test_negative_sixty_hm - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_plus_sixty_hm - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_negative_fifty_nine_sixty_dms - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_plus_fifty_nine_sixty_dms - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_negative_sixty_dms - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_plus_sixty_dms - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_angle_to_is_angle - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_angle_to_quantity - TypeError: Warning message must be str, got 60 (type int)
FAILED coordinates/tests/test_angles.py::test_angle_string - TypeError: Warning message must be str, got 60 (type int)
Caused by:
Because we have:
astropy/astropy/coordinates/angles/errors.py
Lines 106 to 117 in 102b37c
| class IllegalMinuteWarning(AstropyWarning): | |
| """ | |
| Raised when a minute value is 60. | |
| Parameters | |
| ---------- | |
| minute : int, float | |
| """ | |
| def __init__(self, minute, alternativeactionstr=None): | |
| self.minute = minute | |
| self.alternativeactionstr = alternativeactionstr |
Reported to:
Reactions are currently unavailable