class_docstr: A test case that captures log messages.
code: def tearDown(self):
      logging.getLogger().removeHandler(self._logcount_handler)
      super().tearDown()
  
imports: import locale
  import logging
  import os
  import re
  import subprocess
  import sys
  import unittest
  from contextlib import contextmanager
  from functools import wraps
  from io import StringIO
  from logging.handlers import BufferingHandler
  from shutil import rmtree
  from tempfile import mkdtemp
  from pelican.contents import Article
  from pelican.readers import default_metadata
  from pelican.settings import DEFAULT_CONFIG
label_desc: Use image node_id 2 for calling the LoggedTestCase obj's underlying member method code with example usage: obj.tearDown() without return types