python setup.py test
[...]
ImportError while loading conftest '/private/var/folders/56/t9pt6z214_b5tc62kzngvr_c0000gn/T/pyregion-test-73ct84z2/lib/python3.10/site-packages/pyregion/conftest.py'.
pyregion/conftest.py:15: in <module>
from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
E ModuleNotFoundError: No module named 'astropy.tests.plugins'
Tests fail with Astropy 5.1: