class_docstr: A pytest class suite for gpustat.
class_docstr_tok: ["A","pytest","class","suite","for","gpustat","."]
docstr: --color should work well even when executed without TERM,
  e.g. ssh localhost gpustat --color
code: def test_no_TERM(self, scenario_basic, monkeypatch):
      """--color should work well even when executed without TERM,
      e.g. ssh localhost gpustat --color"""
      monkeypatch.setenv("TERM", "")
  
      s = self.capture_output(
          "gpustat", "--color", "--no-header"
      ).rstrip()
      print(s)
      assert (
          remove_ansi_codes(s) == MOCK_EXPECTED_OUTPUT_DEFAULT
      ), "wrong gpustat output"
  
      assert "\x1b[36m" in s, "should contain cyan color code"
      assert "\x0f" not in s, "Extra \\x0f found (see issue #32)"
  
imports: import ctypes
  import os
  import re
  import shlex
  import sys
  import types
  from collections import namedtuple
  from io import StringIO
  from typing import Any
  import psutil
  import pytest
  from mockito import ANY, mock, unstub, when, when2
  import gpustat
  from gpustat.nvml import pynvml, pynvml_monkeypatch
label_desc: Use image node_id 12 for calling the TestGPUStat obj's underlying member method code with example usage: obj.test_no_TERM(scenario_basic, monkeypatch) without return types