Пример #1
0
    def testLoad (self):
        styleslist = StylesList (self._dirlist)
        self.assertEqual (len (styleslist), 2)

        style1 = os.path.join (self._dirlist[0], "example_jblog")
        style2 = os.path.join (self._dirlist[1], "example_jnet")

        self.assertEqual (os.path.abspath (style1), os.path.abspath (styleslist[0]))
        self.assertEqual (os.path.abspath (style2), os.path.abspath (styleslist[1]))
Пример #2
0
    def __init__(self, parent):
        super(AddStyleDialog,
              self).__init__(parent,
                             style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.__stylesList = StylesList(getStylesDirList())

        self.SetMinSize((300, 80))
        self.__createGui()
        self.Center(wx.CENTRE_ON_SCREEN)
Пример #3
0
 def testIter (self):
     styleslist = StylesList (self._dirlist)
     styles = [style for style in styleslist]
     self.assertEqual (len (styles), 2)
Пример #4
0
 def testInvalidPath (self):
     styleslist = StylesList (["../test/styles/invalid_not_exists"])
     self.assertEqual (len (styleslist), 0)
Пример #5
0
 def testEmpty (self):
     styleslist = StylesList ([])
     self.assertEqual (len (styleslist), 0)
Пример #6
0
 def _initStyleList(self, currentPage):
     self._stylesList = StylesList(getStylesDirList())
     self._fillStyleCombo(self._stylesList, currentPage)