In the pytest code we try very hard to avoid importing `unittest` if it's not already imported, even in the unittest plugin. But we slipped here: https://github.com/pytest-dev/pytest/blob/e82651074d18a9a905d3beefb62bd7eb8196b6cd/src/_pytest/debugging.py#L14 We should handle it similarly to other places by checking if `unittest` is in `sys.modules` first.
In the pytest code we try very hard to avoid importing
unittestif it's not already imported, even in the unittest plugin. But we slipped here:pytest/src/_pytest/debugging.py
Line 14 in e826510
We should handle it similarly to other places by checking if
unittestis insys.modulesfirst.