test_misc.py: fix bad assumption about LogRecord fields
The test was using LogRecord's asctime attribute to calculate a time
difference between two log entries. Although the attribute is documented
with no caveat, others have run into the problem that it does not exist
on logging.LogRecord unless a formatter with a format string referencing
{asctime} has been used. Since there's a 'created' time that's more
appropriate for this test anyway, use that instead.
This commit enables updating pytest, because pytest's logging init
code has changed: https://github.com/pytest-dev/pytest/discussions/9324