MCPcopy Index your code
hub / github.com/python/cpython / test_scroll

Method test_scroll

Lib/test/test_curses.py:452–464  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

450 self.assertEqual(win.instr(3, 0), b' ')
451
452 def test_scroll(self):
453 win = curses.newwin(5, 15, 5, 2)
454 lorem_ipsum(win)
455 win.scrollok(True)
456 win.scroll()
457 self.assertEqual(win.instr(0, 0), b'dolor sit amet,')
458 win.scroll(2)
459 self.assertEqual(win.instr(0, 0), b'adipiscing elit')
460 win.scroll(-3)
461 self.assertEqual(win.instr(0, 0), b' ')
462 self.assertEqual(win.instr(2, 0), b' ')
463 self.assertEqual(win.instr(3, 0), b'adipiscing elit')
464 win.scrollok(False)
465
466 def test_attributes(self):
467 # TODO: attr_get(), attr_set(), ...

Callers

nothing calls this directly

Calls 2

lorem_ipsumFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected