Skip to content

TST: "Exotic archs" has 3 failures with AssertionError: Regex pattern did not match. #16884

Closed

Description

@pllim

Noticed it today: https://github.com/astropy/astropy/actions/runs/10554512360/job/29236483624

Most likely suspect:

Affected tests:

  • astropy/units/tests/test_quantity_erfa_ufuncs.py::TestPVUfuncs::test_s2p_not_all_quantity
  • astropy/units/tests/test_quantity_erfa_ufuncs.py::TestGeodetic::test_unit_errors
  • astropy/units/tests/test_quantity_ufuncs.py::TestQuantityTrigonometricFuncs::test_sin_with_quantity_out

Error:

  >       with pytest.raises(AttributeError, match="is treated as dimensionless"):
  E       AssertionError: Regex pattern did not match.
  E        Regex: 'is treated as dimensionless'
  E        Input: "'NoneType' object has no attribute 'get_converter'"

Does not bode well for #16879 but we need to understand why the behavior is different for these jobs only. They appear to be using Python 3.12.

Activity

  1. added this to the v7.0.0 milestone on Aug 26, 2024
  2. pllim commented on Aug 26, 2024

    @pllim
    MemberAuthor

    Looks like the failed jobs used pytest 7.4.4 but main CI use pytest 8.3.2. So now I am pretty sure it is because pytest-dev/pytest#11227 is only released in pytest 8 or later.

    So, how are we going to support Python 3.11 or later but using pytest 7? 🤔

  3. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    How weird! Is this something about the emulators running those? Why all exotic archs?? I think the problem may be that pytest is out of date - it was made to deal with notes in pytest-dev/pytest#11227, which is from 2023 July 18 ... indeed, in that PR it seems I commented on it in https://github.com/astropy/astropy/pull/16346/files#r1581899716 and state there that it needs pytest 8.0. Shall we try requiring pytest 8.0?

  4. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    Aha, we came to the same conclusion. Let me make a quick PR upping to 8.0 and see if that runs on the exotics!

  5. pllim commented on Aug 26, 2024

    @pllim
    MemberAuthor

    pytest 8 was only released in Jan 2024. Might be too early to abandon pytest 7 (that is, we might have users trying to test astropy using the problematic combo). How about for those 3 tests, we adjust the regex matching depending on pytest (edit: and Python) versions?

    PYTEST_LT_8_0 = not minversion(pytest, "8.0")

  6. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    See #16885...

    Though I now see your later comment. I think it should be OK - people test with tox and that will pull in the right version. But I'm not quite sure whether the exotic archs can have the more recent version.

    Anyway, also happy to go with your suggestion.

  7. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    p.s. Note that we are really talking about people testing this in a couple of months. Since this is about testing, not running astropy, maybe it is OK to require a more recent pytest?

  8. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    Anyway, since PYTEST_LT_8_0 actually exists, let me make the alternative PR...

  9. mhvk commented on Aug 26, 2024

    @mhvk
    Contributor

    See #16886 - I closed #16885 since we have PYTEST_LT_8_0 at lots of places, so if one sets a higher minimum version, those places should be adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions