class StatusBarTest(unittest.TestCase): def setUp(self): self.stdscr = Dummy_stdscr() self.statusbar = StatusBar(self.stdscr.getmaxyx()[0]-1, self.stdscr) def test_add_text(self): text = 'hello world' self.statusbar.add_text(text, 'left') assert self.statusbar.text_left == text
def setUp(self): self.scrollback = 200 self.stdscr = Dummy_stdscr() self.pager = Pager(self.scrollback, self.stdscr) assert self.pager is not None assert self.pager.scrollback == self.scrollback assert self.pager.scroll_pos == 0 assert self.pager.text_ypos == 0 assert (self.pager.term_height, self.pager.term_width) \ == self.stdscr.getmaxyx()
class PagerTestCase(unittest.TestCase): def setUp(self): self.scrollback = 200 self.stdscr = Dummy_stdscr() self.pager = Pager(self.scrollback, self.stdscr) assert self.pager is not None assert self.pager.scrollback == self.scrollback assert self.pager.scroll_pos == 0 assert self.pager.text_ypos == 0 assert (self.pager.term_height, self.pager.term_width) \ == self.stdscr.getmaxyx() def test_add_text(self): text = 'hello world'
def setUp(self): self.stdscr = Dummy_stdscr() self.statusbar = StatusBar(self.stdscr.getmaxyx()[0]-1, self.stdscr)