code: def test_log_no_ansi_colors(tmp_path):
      with force_colors():
          wfile = tmp_path / "warnings.txt"
          srcdir = TESTS_ROOT / "roots" / "test-nitpicky-warnings"
          argv = list(
              map(
                  str,
                  ["-b", "html", srcdir, tmp_path, "-n", "-w", wfile],
              )
          )
          retcode = build_main(argv)
          assert retcode == 0
  
          content = wfile.read_text(encoding="utf8")
          assert "\x1b[91m" not in content
  
file_path: sphinx/tests/test_builders/test_build.py
imports: import os
  import shutil
  from contextlib import contextmanager
  from unittest import mock
  import pytest
  from docutils import nodes
  from sphinx.cmd.build import build_main
  from sphinx.errors import SphinxError
  from tests.utils import TESTS_ROOT
label_desc: Use image node_id 9 for calling a global function with example usage: test_log_no_ansi_colors(tmp_path) without return types