'Test the methods of windows'

def test_window_funcs(self):

    stdscr = self.stdscr
    win = curses.newwin(10, 10)
    win = curses.newwin(5, 5, 5, 5)
    win2 = curses.newwin(15, 15, 5, 5)
    for meth in [stdscr.addch, stdscr.addstr]:
        for args in [('a',), ('a', curses.A_BOLD), (4, 4, 'a'), (5, 5, 'a', curses.A_BOLD)]:
            with self.subTest(meth=meth.__qualname__, args=args):
                meth(*args)
    for meth in [stdscr.box, stdscr.clear, stdscr.clrtobot, stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, stdscr.deleteln, stdscr.erase, stdscr.getbegyx, stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx, stdscr.getparyx, stdscr.getyx, stdscr.inch, stdscr.insertln, stdscr.instr, stdscr.is_wintouched, win.noutrefresh, stdscr.redrawwin, stdscr.refresh, stdscr.standout, stdscr.standend, stdscr.syncdown, stdscr.syncup, stdscr.touchwin, stdscr.untouchwin]:
        with self.subTest(meth=meth.__qualname__):
            meth()
    stdscr.addnstr('1234', 3)
    stdscr.addnstr('1234', 3, curses.A_BOLD)
    stdscr.addnstr(4, 4, '1234', 3)
    stdscr.addnstr(5, 5, '1234', 3, curses.A_BOLD)
    stdscr.attron(curses.A_BOLD)
    stdscr.attroff(curses.A_BOLD)
    stdscr.attrset(curses.A_BOLD)
    stdscr.bkgd('    ')
    stdscr.bkgd('    ', curses.A_REVERSE)
    stdscr.bkgdset('    ')
    stdscr.bkgdset('    ', curses.A_REVERSE)
    win.border(65, 66, 67, 68, 69, 70, 71, 72)
    win.border('|', '!', '-', '_', '+', '\\', '#', '/')
    with self.assertRaises(TypeError, msg='Expected    win.border()    to    raise    TypeError'):
        win.border(65, 66, 67, 68, 69, [], 71, 72)
    stdscr.clearok(1)
    win4 = stdscr.derwin(2, 2)
    win4 = stdscr.derwin(1, 1, 5, 5)
    win4.mvderwin(9, 9)
    stdscr.echochar('a')
    stdscr.echochar('a', curses.A_BOLD)
    stdscr.hline('-', 5)
    stdscr.hline('-', 5, curses.A_BOLD)
    stdscr.hline(1, 1, '-', 5)
    stdscr.hline(1, 1, '-', 5, curses.A_BOLD)
    stdscr.idcok(1)
    stdscr.idlok(1)
    stdscr.immedok(1)
    stdscr.insch('c')
    stdscr.insdelln(1)
    stdscr.insnstr('abc', 3)
    stdscr.insnstr('abc', 3, curses.A_BOLD)
    stdscr.insnstr(5, 5, 'abc', 3)
    stdscr.insnstr(5, 5, 'abc', 3, curses.A_BOLD)
    stdscr.insstr('def')
    stdscr.insstr('def', curses.A_BOLD)
    stdscr.insstr(5, 5, 'def')
    stdscr.insstr(5, 5, 'def', curses.A_BOLD)
    stdscr.is_linetouched(0)
    stdscr.keypad(1)
    stdscr.leaveok(1)
    stdscr.move(3, 3)
    win.mvwin(2, 2)
    stdscr.nodelay(1)
    stdscr.notimeout(1)
    win2.overlay(win)
    win2.overwrite(win)
    win2.overlay(win, 1, 2, 2, 1, 3, 3)
    win2.overwrite(win, 1, 2, 2, 1, 3, 3)
    stdscr.redrawln(1, 2)
    stdscr.scrollok(1)
    stdscr.scroll()
    stdscr.scroll(2)
    stdscr.scroll((-3))
    stdscr.move(12, 2)
    stdscr.setscrreg(10, 15)
    win3 = stdscr.subwin(10, 10)
    win3 = stdscr.subwin(10, 10, 5, 5)
    stdscr.syncok(1)
    stdscr.timeout(5)
    stdscr.touchline(5, 5)
    stdscr.touchline(5, 5, 0)
    stdscr.vline('a', 3)
    stdscr.vline('a', 3, curses.A_STANDOUT)
    stdscr.chgat(5, 2, 3, curses.A_BLINK)
    stdscr.chgat(3, curses.A_BOLD)
    stdscr.chgat(5, 8, curses.A_UNDERLINE)
    stdscr.chgat(curses.A_BLINK)
    stdscr.refresh()
    stdscr.vline(1, 1, 'a', 3)
    stdscr.vline(1, 1, 'a', 3, curses.A_STANDOUT)
    if hasattr(curses, 'resize'):
        stdscr.resize()
    if hasattr(curses, 'enclose'):
        stdscr.enclose()
    self.assertRaises(ValueError, stdscr.getstr, (-400))
    self.assertRaises(ValueError, stdscr.getstr, 2, 3, (-400))
    self.assertRaises(ValueError, stdscr.instr, (-2))
    self.assertRaises(ValueError, stdscr.instr, 2, 3, (-2))
