code: def test_colored_ansi_esc_caplogtext(pytester: Pytester) -> None:
      """Make sure that caplog.text does not contain ANSI escape sequences."""
      pytester.makepyfile(
          """
          import logging
  
          logger = logging.getLogger(__name__)
  
          def test_foo(caplog):
              logger.info('text going to logger from call')
              assert '\x1b' not in caplog.text
          """
      )
      result = pytester.runpytest("--log-level=INFO", "--color=yes")
      assert result.ret == 0
  
imports: import io
  import os
  import re
  from typing import cast
  import pytest
  from _pytest.capture import CaptureManager
  from _pytest.config import ExitCode
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import Pytester
  from _pytest.terminal import TerminalReporter
label_desc: Use image node_id 30 for calling a global function with example usage: test_colored_ansi_esc_caplogtext(pytester) without return types