Grotti 3.5.0: Pagination, Logging, Deb-Paket, Makro-Doku, PLA-Match-Fix.
This commit is contained in:
1 parent
4ffe1dcfc6
commit
f1f79c2ce2
38 files changed
+1062
-75
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"""Logging-Hilfen."""
|
||||
|
||||
import logging
|
||||
import unittest
|
||||
|
||||
from grotti import logutil
|
||||
|
||||
|
||||
class LogutilTests(unittest.TestCase):
|
||||
def test_parse_level(self):
|
||||
self.assertEqual(logutil.parse_level("DEBUG"), logging.DEBUG)
|
||||
self.assertEqual(logutil.parse_level("warn"), logging.WARNING)
|
||||
self.assertEqual(logutil.parse_level("nope"), logging.INFO)
|
||||
|
||||
def test_setup_idempotent(self):
|
||||
logutil.setup("INFO")
|
||||
logutil.setup("DEBUG")
|
||||
self.assertEqual(logging.getLogger().level, logging.DEBUG)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user