docstr: Test if the print rich exception method is working fine.
docstr_tok: ["Test","if","the","print","rich","exception","method","is","working","fine","."]
code: def test_handle_print_rich_exception(self):
      """Test if the print rich exception method is working fine."""
  
      with io.StringIO() as buf:
          # Capture stdout logs (rich logs to stdout)
          with contextlib.redirect_stdout(buf):
              _print_rich_exception(Exception("boom!"))
          # Capture the stdout output
          captured_output = buf.getvalue()
  
          assert "Exception:" in captured_output
          assert "boom!" in captured_output
  
file_path: streamlit/lib/tests/streamlit/error_util_test.py
imports: import contextlib
  import io
  import unittest
  from unittest.mock import patch
  from streamlit.error_util import _print_rich_exception, handle_uncaught_app_exception
  from tests import testutil
label_desc: Use image node_id 3 for calling the ErrorUtilTest obj's underlying member method code with example usage: obj.test_handle_print_rich_exception() without return types