From 9f6acb154150c5c5a273f6e2f46f4087ef3cf49a Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Mon, 13 Jan 2025 17:00:02 +0100 Subject: [PATCH] Added test for text.log --- tests/text/test_log.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/text/test_log.py diff --git a/tests/text/test_log.py b/tests/text/test_log.py new file mode 100644 index 0000000..b52510e --- /dev/null +++ b/tests/text/test_log.py @@ -0,0 +1,17 @@ +#!/usr/bin/python3 + +from wobbl_tools.text.log import Log + +print("\n==== wobbl_tools.text.log =====") + +test_log = Log("test_log.txt") + +test_log.write("Testing the log module...") +test_log.write("This should be fine...", "ok") +test_log.write("Something happened...", "warning") +test_log.write("Oh shit!", "error") + + +print("Logfile contents:") +print(test_log.read()) +