def __init__(self): width = gdb.parameter('width') height = gdb.parameter('height') sys_terminal = SysTerminal() depth = sys_terminal.depth() if not width: width = sys_terminal.width() if not height: height = sys_terminal.height() super(GdbTerminal, self).__init__(width, height, depth)
def test_dumb(self): term = environ['TERM'] exception = None try: environ['TERM'] = 'dumb' dumb_terminal = SysTerminal() dumb_terminal.write('Test dumb\n') except Exception as e: exception = e environ['TERM'] = term if exception is not None: raise exception
class SysTerminalTest(TestCase): def setUp(self): self._terminal = SysTerminal() def test_percent(self): self._terminal.write('Unformatted: %%\n') def test_write(self): self._terminal.write('Test\n') def test_dumb(self): term = environ['TERM'] exception = None try: environ['TERM'] = 'dumb' dumb_terminal = SysTerminal() dumb_terminal.write('Test dumb\n') except Exception as e: exception = e environ['TERM'] = term if exception is not None: raise exception
class SysTerminalTest(TestCase): def setUp(self): self._terminal = SysTerminal() def tearDown(self): self._terminal.reset() def test_percent(self): self._terminal.write('Unformatted: %%\n') def test_write(self): self._terminal.write('Test\n')
def setUp(self, terminal=None, theme=None): super(ZenburnTest, self).setUp(SysTerminal(), Zenburn())
def setUp(self, terminal=None, theme=None): super(SolarizedTest, self).setUp(SysTerminal(), Solarized())
def setUp(self): self._terminal = SysTerminal()
def setUp(self): self._terminal = AnsiTerminal(SysTerminal(), Solarized())
def setUp(self): self._terminal = AnsiTerminal(SysTerminal(), Solarized()) self._terminal.reset() self._terminal.write('\n\t# Begin Widget #\n')