Beispiel #1
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        Application.onPostprocessing.clear()
        Application.onPreprocessing.clear()

        HtmlPageFactory().create(self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory().create(self.wikiroot, u"HTML-страница 2", [])
Beispiel #2
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        Application.onPostprocessing.clear()
        Application.onPreprocessing.clear()

        HtmlPageFactory().create(self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory().create(self.wikiroot, u"HTML-страница 2", [])
Beispiel #3
0
    def tearDown(self):
        from livejournal.ljconfig import LJConfig

        BaseMainWndTest.tearDown (self)
        LJConfig (Application.config).users.value = []
        LJConfig (Application.config).communities.value = []
        self.loader.clear()
Beispiel #4
0
    def tearDown(self):
        from livejournal.ljconfig import LJConfig

        BaseMainWndTest.tearDown(self)
        LJConfig(Application.config).users.value = []
        LJConfig(Application.config).communities.value = []
        self.loader.clear()
Beispiel #5
0
    def setUp(self):
        BaseMainWndTest.setUp (self)
        self.__createWiki ()

        dirlist = [self.getPluginDir()]

        self.loader = PluginsLoader(Application)
        self.loader.load (dirlist)
    def tearDown(self):
        Application.wikiroot = None

        removeDir (self.path)
        self._dlg.Destroy()
        self._loader.clear()

        BaseMainWndTest.tearDown (self)
Beispiel #7
0
    def tearDown(self):
        Tester.dialogTester.clear()
        Application.wikiroot = None

        removeDir(self.path)
        self._loader.clear()

        BaseMainWndTest.tearDown(self)
    def tearDown(self):
        Application.wikiroot = None

        removeDir(self.path)
        self._dlg.Destroy()
        self._loader.clear()

        BaseMainWndTest.tearDown(self)
Beispiel #9
0
    def tearDown(self):
        Tester.dialogTester.clear()
        Application.wikiroot = None

        removeDir(self.path)
        self._loader.clear()

        BaseMainWndTest.tearDown(self)
Beispiel #10
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self.__createWiki()

        dirlist = [self.getPluginDir()]

        self.loader = PluginsLoader(Application)
        self.loader.load(dirlist)
Beispiel #11
0
    def tearDown(self):
        Application.wikiroot = None
        self._dlg.Destroy()
        self._loader.clear()

        from externaltools.config import ExternalToolsConfig
        ExternalToolsConfig(Application.config).clearAll()

        BaseMainWndTest.tearDown(self)
Beispiel #12
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        Application.onPostprocessing.clear()
        Application.onPreprocessing.clear()

        WikiConfig(Application.config).showHtmlCodeOptions.value = False

        WikiPageFactory().create(self.wikiroot, u"Викистраница", [])
        WikiPageFactory().create(self.wikiroot, u"Викистраница 2", [])
Beispiel #13
0
    def setUp (self):
        BaseMainWndTest.setUp (self)
        Application.onPostprocessing.clear()
        Application.onPreprocessing.clear()

        WikiConfig (Application.config).showHtmlCodeOptions.value = False

        WikiPageFactory().create (self.wikiroot, u"Викистраница", [])
        WikiPageFactory().create (self.wikiroot, u"Викистраница 2", [])
Beispiel #14
0
    def tearDown(self):
        Application.wikiroot = None
        self._dlg.Destroy()
        self._loader.clear()

        from externaltools.config import ExternalToolsConfig
        ExternalToolsConfig (Application.config).clearAll()

        BaseMainWndTest.tearDown (self)
Beispiel #15
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        mainWnd = Application.mainWindow
        plugins_dir = [u"../plugins/snippets"]

        self.loader = PluginsLoader(Application)
        self.loader.load(plugins_dir)

        from snippets.gui.variablesdialog import VariablesDialog
        self._dialog = VariablesDialog(mainWnd)
Beispiel #16
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        mainWnd = Application.mainWindow
        plugins_dir = [u"../plugins/snippets"]

        self.loader = PluginsLoader(Application)
        self.loader.load(plugins_dir)

        from snippets.gui.variablesdialog import VaraiblesPanel
        self._panel = VaraiblesPanel(mainWnd)
Beispiel #17
0
    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", [])
        factory.create (self.wikiroot[u"Страница 2/Страница 3"], u"Страница 4", [])
        factory.create (self.wikiroot[u"Страница 1"], u"Страница 5", [])

        self._tabsController = Application.mainWindow.tabsController
        self._actionController = Application.actionController
    def setUp(self):
        BaseMainWndTest.setUp(self)
        plugins_dir = [u"../plugins/snippets"]
        self._createWiki()
        self._application = Application
        self._createWiki()
        self._application.wikiroot = self.wikiroot

        self.loader = PluginsLoader(Application)
        self.loader.load(plugins_dir)

        from snippets.gui.variablesdialog import VariablesDialogController
        self._controller = VariablesDialogController(self._application)
Beispiel #19
0
    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", [])
        factory.create(self.wikiroot[u"Страница 2/Страница 3"], u"Страница 4",
                       [])
        factory.create(self.wikiroot[u"Страница 1"], u"Страница 5", [])

        self._tabsController = Application.mainWindow.tabsController
        self._actionController = Application.actionController
Beispiel #20
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self._application = Application

        self.__createWiki()
        self.testPage = self.wikiroot[u"Страница 1"]

        dirlist = [u"../plugins/hackpage"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        Tester.dialogTester.clear()
Beispiel #21
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self._application = Application

        self.__createWiki()
        self.testPage = self.wikiroot[u"Страница 1"]
        self.testPage2 = self.wikiroot[u"Страница 2"]

        dirlist = [u"../plugins/hackpage"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        Tester.dialogTester.clear()
Beispiel #22
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        dirlist = [u"../plugins/externaltools"]

        self._loader = PluginsLoader(Application)
        self._loader.load (dirlist)

        from externaltools.config import ExternalToolsConfig
        ExternalToolsConfig (Application.config).clearAll()

        from externaltools.commandexec.execdialog import ExecDialog
        self._dlg = ExecDialog (Application.mainWindow)
        Tester.dialogTester.clear()
        Tester.dialogTester.appendOk()
Beispiel #23
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        dirlist = [u"../plugins/externaltools"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        from externaltools.config import ExternalToolsConfig
        ExternalToolsConfig(Application.config).clearAll()

        from externaltools.commandexec.execdialog import ExecDialog
        self._dlg = ExecDialog(Application.mainWindow)
        Tester.dialogTester.clear()
        Tester.dialogTester.appendOk()
Beispiel #24
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self._application = Application

        self.testPage = WikiPageFactory().create(self.wikiroot, u"Страница 1",
                                                 [])
        self.testPage2 = WikiPageFactory().create(self.wikiroot, u"Страница 2",
                                                  [])

        dirlist = [u"../plugins/hackpage"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        Tester.dialogTester.clear()
Beispiel #25
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.filesPath = u"../test/samplefiles/"
        self.__createWiki()

        dirlist = [u"../plugins/changepageuid"]

        self._loader = PluginsLoader(Application)
        self._loader.load (dirlist)

        from changepageuid.dialog import ChangeUidDialog
        self._dlg = ChangeUidDialog (Application.mainWindow)
        Tester.dialogTester.clear()

        self.testPage = self.wikiroot[u"Страница 1"]
Beispiel #26
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.filesPath = u"../test/samplefiles/"
        WikiPageFactory().create (self.wikiroot, u"Страница 1", [])

        dirlist = [u"../plugins/counter"]

        self._loader = PluginsLoader(Application)
        self._loader.load (dirlist)

        from counter.insertdialog import InsertDialog
        self._dlg = InsertDialog (Application.mainWindow)
        Tester.dialogTester.clear()
        Tester.dialogTester.appendOk()

        self.testPage = self.wikiroot[u"Страница 1"]
    def setUp(self):
        BaseMainWndTest.setUp(self)

        self.filesPath = u"../test/samplefiles/"
        self.__createWiki()

        dirlist = [u"../plugins/changepageuid"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        from changepageuid.dialog import ChangeUidDialog

        self._dlg = ChangeUidDialog(Application.mainWindow)
        Tester.dialogTester.clear()

        self.testPage = self.wikiroot[u"Страница 1"]
Beispiel #28
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        self.__pluginname = u"Livejournal"

        self.__createWiki()
        self.testPage = self.wikiroot[u"Страница 1"]

        dirlist = [u"../plugins/livejournal"]

        self.loader = PluginsLoader(Application)
        self.loader.load(dirlist)

        from livejournal.ljconfig import LJConfig

        LJConfig(Application.config).users.value = []
        LJConfig(Application.config).communities.value = []
Beispiel #29
0
    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%", ""),
            (PREFORMAT_STR_ID, "[@", "@]"),
            (CODE_STR_ID, "@@", "@@"),
            (ANCHOR_STR_ID, "[[#", "]]"),
            (QUOTE_STR_ID, "[>", "<]"),
        ]

        self._replaceSyntax = [
            (HORLINE_STR_ID, u"----"),
        ]

        self._headingsSyntax = [
            (HEADING_1_STR_ID, u'!!'),
            (HEADING_2_STR_ID, u'!!!'),
            (HEADING_3_STR_ID, u'!!!!'),
            (HEADING_4_STR_ID, u'!!!!!'),
            (HEADING_5_STR_ID, u'!!!!!!'),
            (HEADING_6_STR_ID, u'!!!!!!!'),
        ]

        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
Beispiel #30
0
    def setUp(self):
        BaseMainWndTest.setUp (self)

        self.__pluginname = u"Livejournal"

        self.__createWiki()
        self.testPage = self.wikiroot[u"Страница 1"]

        dirlist = [u"../plugins/livejournal"]

        self.loader = PluginsLoader(Application)
        self.loader.load (dirlist)

        from livejournal.ljconfig import LJConfig

        LJConfig (Application.config).users.value = []
        LJConfig (Application.config).communities.value = []
Beispiel #31
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self._application = Application

        self.testPage = WikiPageFactory().create(self.wikiroot,
                                                 u"Страница 1",
                                                 [])
        self.testPage2 = WikiPageFactory().create(self.wikiroot,
                                                  u"Страница 2",
                                                  [])

        dirlist = [u"../plugins/hackpage"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        Tester.dialogTester.clear()
Beispiel #32
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        self.filesPath = u"../test/samplefiles/"
        WikiPageFactory().create(self.wikiroot, u"Страница 1", [])

        dirlist = [u"../plugins/counter"]

        self._loader = PluginsLoader(Application)
        self._loader.load(dirlist)

        from counter.insertdialog import InsertDialog

        self._dlg = InsertDialog(Application.mainWindow)
        Tester.dialogTester.clear()
        Tester.dialogTester.appendOk()

        self.testPage = self.wikiroot[u"Страница 1"]
Beispiel #33
0
    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>'),
            (QUOTE_STR_ID, u'<blockquote>', u'</blockquote>'),
            (IMAGE_STR_ID, u'<img src="', u'"/>'),
        ]

        self._replaceSyntax = [
            (HORLINE_STR_ID, u"<hr>"),
        ]

        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
Beispiel #34
0
    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>'),
            (QUOTE_STR_ID, u'<blockquote>', u'</blockquote>'),
            (IMAGE_STR_ID, u'<img src="', u'"/>'),
        ]

        self._replaceSyntax = [
            (HORLINE_STR_ID, u"<hr>"),
        ]

        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
Beispiel #35
0
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self.page = self._createPage()
     Application.wikiroot = self.wikiroot
     Application.selectedPage = self.page
Beispiel #36
0
 def tearDown(self):
     BaseMainWndTest.tearDown(self)
     Application.wikiroot = None
     self.loader.clear()
Beispiel #37
0
 def tearDown(self):
     self._dialog.Destroy()
     self.loader.clear()
     BaseMainWndTest.tearDown(self)
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self.page = self._createPage()
     Application.wikiroot = self.wikiroot
     Application.selectedPage = self.page
Beispiel #39
0
 def tearDown(self):
     self.loader.clear()
     BaseMainWndTest.tearDown(self)
Beispiel #40
0
 def tearDown (self):
     BaseMainWndTest.tearDown (self)
     Application.wikiroot = None
     self.loader.clear()
Beispiel #41
0
 def tearDown(self):
     BaseMainWndTest.tearDown(self)
     Application.onPostprocessing.clear()
     Application.onPreprocessing.clear()
Beispiel #42
0
 def tearDown(self):
     Application.selectedPage = None
     Application.wikiroot = None
     self.loader.clear()
     BaseMainWndTest.tearDown (self)
Beispiel #43
0
 def tearDown (self):
     BaseMainWndTest.tearDown (self)
     Application.config.remove_section (self.actionController.configSection)
 def tearDown(self):
     self._controller.destroy()
     BaseMainWndTest.tearDown(self)
     removeDir(self.path)
     self.loader.clear()
Beispiel #45
0
 def tearDown(self):
     BaseMainWndTest.tearDown(self)
     Application.onPostprocessing.clear()
     Application.onPreprocessing.clear()
Beispiel #46
0
 def tearDown(self):
     Application.selectedPage = None
     Application.wikiroot = None
     self.loader.clear()
     BaseMainWndTest.tearDown(self)
Beispiel #47
0
 def tearDown(self):
     self.loader.clear()
     BaseMainWndTest.tearDown(self)
Beispiel #48
0
 def tearDown(self):
     self._dialog.Destroy()
     self.loader.clear()
     BaseMainWndTest.tearDown(self)
Beispiel #49
0
    def setUp (self):
        BaseMainWndTest.setUp (self)
        self.actionController = ActionController(self.wnd, Application.config)
        Application.config.remove_section (self.actionController.configSection)

        self._actionVal = 0