Пример #1
0
    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)
Пример #2
0
    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
Пример #3
0
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
Пример #4
0
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')
Пример #5
0
 def setUp(self, terminal=None, theme=None):
     super(ZenburnTest, self).setUp(SysTerminal(), Zenburn())
Пример #6
0
 def setUp(self, terminal=None, theme=None):
     super(SolarizedTest, self).setUp(SysTerminal(), Solarized())
Пример #7
0
 def setUp(self):
     self._terminal = SysTerminal()
Пример #8
0
 def setUp(self):
     self._terminal = AnsiTerminal(SysTerminal(), Solarized())
Пример #9
0
    def setUp(self):
        self._terminal = AnsiTerminal(SysTerminal(), Solarized())

        self._terminal.reset()
        self._terminal.write('\n\t# Begin Widget #\n')