Using with unittest#
logot is compatible with any testing framework, including unittest:
import unittest
from logot import Logot, logged
class MyAppTest(unittest.TestCase):
def test_my_app(self) -> None:
with Logot().capturing() as logot:
app.start()
logot.wait_for(logged.info("App started"))
See also
See Logot and Logot.capturing() API reference.