本文整理汇总了Python中basemainwnd.BaseMainWndTest类的典型用法代码示例。如果您正苦于以下问题:Python BaseMainWndTest类的具体用法?Python BaseMainWndTest怎么用?Python BaseMainWndTest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseMainWndTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
factory = TextPageFactory()
factory.create (self.wikiroot, u"Страница 1", [])
factory.create (self.wikiroot, u"Страница 2", [])
factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])
示例2: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.path = u"../test/testwiki"
removeWiki (self.path)
self.wikiroot = WikiDocument.create (self.path)
示例3: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
TextPageFactory().create (self.wikiroot, u"Страница", [])
self.testpage = self.wikiroot[u"Страница"]
Application.wikiroot = self.wikiroot
Application.selectedPage = self.testpage
示例4: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.config = GeneralGuiConfig (Application.config)
self.config.pageTab.remove_option()
self.wikipage = WikiPageFactory().create (self.wikiroot, u'Викистраница', [])
self.htmlpage = HtmlPageFactory().create (self.wikiroot, u'HTML-страница', [])
Application.wikiroot = self.wikiroot
Application.selectedPage = None
示例5: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.path = u"../test/testwiki"
removeWiki (self.path)
self.wikiroot = WikiDocument.create (self.path)
HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
HtmlPageFactory.create (self.wikiroot, u"HTML-страница 2", [])
示例6: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.path2 = mkdtemp (prefix=u'Абырвалг абырвалг')
factory = TextPageFactory()
factory.create (self.wikiroot, u"Страница 1", [])
factory.create (self.wikiroot, u"Страница 2", [])
factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])
Tester.dialogTester.clear()
示例7: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.path = u"../test/testwiki"
removeWiki (self.path)
self.rootwiki = WikiDocument.create (self.path)
TextPageFactory.create (self.rootwiki, u"Страница 1", [])
TextPageFactory.create (self.rootwiki, u"Страница 2", [])
TextPageFactory.create (self.rootwiki[u"Страница 2"], u"Страница 3", [])
TextPageFactory.create (self.rootwiki[u"Страница 2/Страница 3"], u"Страница 4", [])
TextPageFactory.create (self.rootwiki[u"Страница 1"], u"Страница 5", [])
示例8: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
factory = TextPageFactory()
factory.create (self.wikiroot, u"Страница 1", [])
factory.create (self.wikiroot, u"Страница 2", [])
factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])
self.page = self.wikiroot[u"Страница 2/Страница 3"]
filesPath = u"../test/samplefiles/"
self.files = [u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp", u"dir"]
self.fullFilesPath = [os.path.join (filesPath, fname) for fname in self.files]
示例9: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self._dialog = IncludeDialog (Application.mainWindow)
WikiPageFactory().create (self.wikiroot, u"Викистраница", [])
self.testedPage = self.wikiroot[u"Викистраница"]
filesPath = u"../test/samplefiles/"
self.files = [u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp", u"dir"]
self.fullFilesPath = [os.path.join (filesPath, fname) for fname in self.files]
Attachment (self.testedPage).attach (self.fullFilesPath)
Tester.dialogTester.clear()
示例10: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self._turnSyntax = [
(BOLD_STR_ID, "<b>", "</b>"),
(ITALIC_STR_ID, "<i>", "</i>"),
(BOLD_ITALIC_STR_ID, "<b><i>", "</i></b>"),
(UNDERLINE_STR_ID, "<u>", "</u>"),
(STRIKE_STR_ID, "<strike>", "</strike>"),
(SUBSCRIPT_STR_ID, "<sub>", "</sub>"),
(SUPERSCRIPT_STR_ID, "<sup>", "</sup>"),
(ALIGN_LEFT_STR_ID, '<div align="left">', '</div>'),
(ALIGN_CENTER_STR_ID, '<div align="center">', '</div>'),
(ALIGN_RIGHT_STR_ID, '<div align="right">', '</div>'),
(ALIGN_JUSTIFY_STR_ID, '<div align="justify">', '</div>'),
(HEADING_1_STR_ID, "<h1>", "</h1>"),
(HEADING_2_STR_ID, "<h2>", "</h2>"),
(HEADING_3_STR_ID, "<h3>", "</h3>"),
(HEADING_4_STR_ID, "<h4>", "</h4>"),
(HEADING_5_STR_ID, "<h5>", "</h5>"),
(HEADING_6_STR_ID, "<h6>", "</h6>"),
(PREFORMAT_STR_ID, "<pre>", "</pre>"),
(CODE_STR_ID, "<code>", "</code>"),
(ANCHOR_STR_ID, u'<a name="', u'"></a>'),
(TABLE_STR_ID, u'<table>', u'</table>'),
(TABLE_ROW_STR_ID, u'<tr>', u'</tr>'),
(TABLE_CELL_STR_ID, u'<td>', u'</td>'),
(QUOTE_STR_ID, u'<blockquote>', u'</blockquote>'),
(IMAGE_STR_ID, u'<img src="', u'"/>'),
]
self._replaceSyntax = [
(HORLINE_STR_ID, u"<hr>"),
]
self.path = u"../test/testwiki"
removeWiki (self.path)
self.wikiroot = WikiDocument.create (self.path)
HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
HtmlPageFactory.create (self.wikiroot, u"temp", [])
# Страница, куда будем переключаться перед изменением содержимого основной страницы
# Можно было бы вместо temppage использовать None, но тогда программе
# пришлось бы каждый раз удалять и создавать панели инструментов, что медленно
self.temppage = self.wikiroot[u"temp"]
self.testpage = self.wikiroot[u"HTML-страница"]
Application.wikiroot = self.wikiroot
Application.selectedPage = self.testpage
示例11: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
TextPageFactory().create (self.wikiroot, u"Текстовая страница", [])
TextPageFactory().create (self.wikiroot, u"Текстовая страница 2", [])
HtmlPageFactory().create (self.wikiroot, u"HTML-страница", [])
HtmlPageFactory().create (self.wikiroot, u"HTML-страница 2", [])
WikiPageFactory().create (self.wikiroot, u"Викистраница", [])
WikiPageFactory().create (self.wikiroot, u"Викистраница 2", [])
SearchPageFactory().create (self.wikiroot, u"Поисковая страница", [])
SearchPageFactory().create (self.wikiroot, u"Поисковая страница 2", [])
示例12: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self._turnSyntax = [
(BOLD_STR_ID, "'''", "'''"),
(ITALIC_STR_ID, "''", "''"),
(BOLD_ITALIC_STR_ID, "''''", "''''"),
(UNDERLINE_STR_ID, "{+", "+}"),
(STRIKE_STR_ID, "{-", "-}"),
(SUBSCRIPT_STR_ID, "'_", "_'"),
(SUPERSCRIPT_STR_ID, "'^", "^'"),
(ALIGN_LEFT_STR_ID, "%left%", ""),
(ALIGN_CENTER_STR_ID, "%center%", ""),
(ALIGN_RIGHT_STR_ID, "%right%", ""),
(ALIGN_JUSTIFY_STR_ID, "%justify%", ""),
(HEADING_1_STR_ID, "!! ", ""),
(HEADING_2_STR_ID, "!!! ", ""),
(HEADING_3_STR_ID, "!!!! ", ""),
(HEADING_4_STR_ID, "!!!!! ", ""),
(HEADING_5_STR_ID, "!!!!!! ", ""),
(HEADING_6_STR_ID, "!!!!!!! ", ""),
(PREFORMAT_STR_ID, "[@", "@]"),
(CODE_STR_ID, "@@", "@@"),
(ANCHOR_STR_ID, "[[#", "]]"),
(QUOTE_STR_ID, "[>", "<]"),
]
self._replaceSyntax = [
(HORLINE_STR_ID, u"----"),
]
self.path = u"../test/testwiki"
removeWiki (self.path)
self.wikiroot = WikiDocument.create (self.path)
WikiPageFactory.create (self.wikiroot, u"Викистраница", [])
WikiPageFactory.create (self.wikiroot, u"temp", [])
# Страница, куда будем переключаться перед изменением содержимого основной страницы
# Можно было бы вместо temppage использовать None, но тогда программе
# пришлось бы каждый раз удалять и создавать панели инструментов, что медленно
self.temppage = self.wikiroot[u"temp"]
self.testpage = self.wikiroot[u"Викистраница"]
Application.wikiroot = self.wikiroot
Application.selectedPage = self.testpage
示例13: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self.path = u"../test/testwiki"
removeWiki (self.path)
self.wikiroot = WikiDocument.create (self.path)
TextPageFactory.create (self.wikiroot, u"Текстовая страница", [])
TextPageFactory.create (self.wikiroot, u"Текстовая страница 2", [])
HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
HtmlPageFactory.create (self.wikiroot, u"HTML-страница 2", [])
WikiPageFactory.create (self.wikiroot, u"Викистраница", [])
WikiPageFactory.create (self.wikiroot, u"Викистраница 2", [])
SearchPageFactory.create (self.wikiroot, u"Поисковая страница", [])
SearchPageFactory.create (self.wikiroot, u"Поисковая страница 2", [])
示例14: setUp
def setUp (self):
BaseMainWndTest.setUp (self)
self._dialog = AttachListDialog (Application.mainWindow)
Tester.dialogTester.clear()
示例15: tearDown
def tearDown (self):
BaseMainWndTest.tearDown (self)
Application.wikiroot = None
removeWiki (self.path)