test_win32rcparser.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def testTabStop(self):
        d = self.resources.dialogs["IDD_TEST_DIALOG2"]
        tabstop_names = ["IDC_EDIT1", "IDOK"] # should have WS_TABSTOP
        tabstop_ids = [self.resources.ids[name] for name in tabstop_names]
        notabstop_names = ["IDC_EDIT2"] # should have WS_TABSTOP
        notabstop_ids = [self.resources.ids[name] for name in notabstop_names]
        num_ok = 0
        for cdef in d[1:]: # skip dlgdef
            #print cdef
            cid = cdef[2]
            style = cdef[-2]
            styleex = cdef[-1]
            if cid in tabstop_ids:
                self.failUnlessEqual(style & win32con.WS_TABSTOP, win32con.WS_TABSTOP)
                num_ok += 1
            elif cid in notabstop_ids:
                self.failUnlessEqual(style & win32con.WS_TABSTOP, 0)
                num_ok += 1
        self.failUnlessEqual(num_ok, len(tabstop_ids) + len(notabstop_ids))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号