def test_supportedTigetNumNotEnoughColor(self):
        """
        L{reporter._AnsiColorizer.supported} returns C{False} if
        C{curses.tigetnum} returns less than 2 supported colors.
        """
        class fakecurses(object):
            error = RuntimeError

            def tigetnum(self, value):
                return 1

        sys.modules['curses'] = fakecurses()
        self.assertFalse(reporter._AnsiColorizer.supported(FakeStream()))

        L{reporter._AnsiColorizer.supported} returns C{False} if
        C{curses.tigetnum} returns less than 2 supported colors.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py