Replace py.test usage with pytest, explicitly require py for tests
pytest 7.2+ no longer depends on py. It ships py.path and py.error only. See https://docs.pytest.org/en/7.2.x/changelog.html#deprecations
The tests use py.code as well, hence we declare and document a test dependency on py.
--HG-- branch : py.test