Exemplo n.º 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]))
Exemplo n.º 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)
Exemplo n.º 3
0
 def testIter (self):
     styleslist = StylesList (self._dirlist)
     styles = [style for style in styleslist]
     self.assertEqual (len (styles), 2)
Exemplo n.º 4
0
 def testInvalidPath (self):
     styleslist = StylesList (["../test/styles/invalid_not_exists"])
     self.assertEqual (len (styleslist), 0)
Exemplo n.º 5
0
 def testEmpty (self):
     styleslist = StylesList ([])
     self.assertEqual (len (styleslist), 0)
Exemplo n.º 6
0
 def _initStyleList(self, currentPage):
     self._stylesList = StylesList(getStylesDirList())
     self._fillStyleCombo(self._stylesList, currentPage)