aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/base.py')
-rw-r--r--tests/base.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/base.py b/tests/base.py
index 88693f382..21613110e 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -1,5 +1,4 @@
import logging
-import unittest
from contextlib import contextmanager
from typing import Dict
@@ -22,8 +21,13 @@ class _CaptureLogHandler(logging.Handler):
self.records.append(record)
-class LoggingTestCase(unittest.TestCase):
- """TestCase subclass that adds more logging assertion tools."""
+class LoggingTestsMixin:
+ """
+ A mixin that defines additional test methods for logging behavior.
+
+ This mixin relies on the availability of the `fail` attribute defined by the
+ test classes included in Python's unittest method to signal test failure.
+ """
@contextmanager
def assertNotLogs(self, logger=None, level=None, msg=None):