]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
tests: Dump log onto the console for Python tests
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Jan 2024 18:27:42 +0000 (18:27 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Jan 2024 18:27:42 +0000 (18:27 +0000)
This is not very elegant, but I don't have a better way to do this now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/python/tests.py

index 12009038f960e0549b229e8da329790fedd86c72..49a5d2a45df604b9f8f11d56e293c9431ad5dc5e 100644 (file)
 #                                                                             #
 ###############################################################################
 
+import logging
 import pakfire
 import os
+import sys
 import tempfile
 import unittest
 
@@ -28,6 +30,9 @@ TEST_DATA_DIR = os.environ.get("TEST_DATA_DIR")
 if not TEST_DATA_DIR:
        raise RuntimeError("TEST_DATA_DIR is not set")
 
+# Setup logging
+logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
+
 class TestCase(unittest.TestCase):
        """
                This is a TestCase class based on unittest.TestCase which has