From 4d8b8d10660fdedd924a4984d8d82fc2c41b6721 Mon Sep 17 00:00:00 2001 From: Kristian Larsson Date: Mon, 27 Jan 2025 10:32:18 +0100 Subject: [PATCH] Add test of logging in tests Just to be run manually to inspect the output. --- test/test_testing/src/logg.act | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test_testing/src/logg.act diff --git a/test/test_testing/src/logg.act b/test/test_testing/src/logg.act new file mode 100644 index 00000000..bb5a9db9 --- /dev/null +++ b/test/test_testing/src/logg.act @@ -0,0 +1,17 @@ +import logging +import testing + +actor AsyncTester(report_result, log_handler): + log = logging.Logger(log_handler) + + def done(): + report_result(False, None) + + def test(): + log.info("AsyncTester.test()", None) + after 0.01: done() + +def _test_asyncact(report_result, log_handler: logging.Handler) -> None: + s = AsyncTester(report_result, log_handler) + s.test() +