Added test for text.log
This commit is contained in:
parent
35ebc6676d
commit
9f6acb1541
1 changed files with 17 additions and 0 deletions
17
tests/text/test_log.py
Normal file
17
tests/text/test_log.py
Normal file
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue