If debug is True, the event loop will be run in debug mode. False disables debug mode explicitly. None is used to respect the global Debug Mode settings.
"
Debug Mode:
When the debug mode is enabled:
"
asyncio checks for coroutines that were not awaited and logs them; this mitigates the “forgotten await” pitfall.
Many non-threadsafe asyncio APIs (such as loop.call_soon() and [loop.call_at() methods) raise an exception if they are called from a wrong thread.
The execution time of the I/O selector is logged if it takes too long to perform an I/O operation.
Callbacks taking longer than 100 milliseconds are logged. The loop.slow_callback_duration attribute can be used to set the minimum execution duration in seconds that is considered “slow”.
"
In the context of unit testing only the non-threadsafe guard seems appropriate. Most of the time unit tests are run in an automated manner and their output will not be inspected unless the test actually fails. Even for the non-threadsafe guard it seems a stretch, as the developer may be doing this intentionally.
It seems to me this setting should be configurable.