コード例 #1
0
ファイル: test_thumbnails.py プロジェクト: sarutobi/outwiker
    def testThumbnailsClear1_attach (self):
        fname = u"accept.png"
        attachPath = os.path.join (self.filesPath, fname)
        Attachment (self.parser.page).attach ([attachPath])

        thumb = Thumbnails (self.parser.page)
        thumb.clearDir ()

        self.assertFalse (os.path.exists (thumb.getThumbPath (create=False)))
コード例 #2
0
    def testThumbnailsClear2(self):
        thumb = Thumbnails(self.parser.page)

        eqn = "y = f(x)"

        text = "{$ %s $}" % (eqn)
        self.parser.toHtml(text)

        self.assertFalse(len(os.listdir(thumb.getThumbPath(False))) == 0)

        thumb.clearDir()

        self.assertEqual(len(os.listdir(thumb.getThumbPath(False))), 0)
コード例 #3
0
ファイル: texequation_test.py プロジェクト: LihMeh/outwiker
    def testThumbnailsClear2 (self):
        thumb = Thumbnails (self.parser.page)

        eqn = "y = f(x)"

        text = "{$ %s $}" % (eqn)
        self.parser.toHtml (text)

        self.assertFalse (len (os.listdir (thumb.getThumbPath (False))) == 0)

        thumb.clearDir()

        self.assertEqual (len (os.listdir (thumb.getThumbPath (False))), 0)
コード例 #4
0
    def testThumbnailsClear2_attach(self):
        fname = u"accept.png"
        attachPath = os.path.join(self.filesPath, fname)
        Attachment(self.parser.page).attach([attachPath])

        thumb = Thumbnails(self.parser.page)

        eqn = "y = f(x)"

        text = "{$ %s $}" % (eqn)
        self.parser.toHtml(text)

        self.assertFalse(len(os.listdir(thumb.getThumbPath(False))) == 0)

        thumb.clearDir()

        self.assertEqual(len(os.listdir(thumb.getThumbPath(False))), 0)
コード例 #5
0
ファイル: texequation_test.py プロジェクト: LihMeh/outwiker
    def testThumbnailsClear2_attach (self):
        fname = u"accept.png"
        attachPath = os.path.join (self.filesPath, fname)
        Attachment (self.parser.page).attach ([attachPath])

        thumb = Thumbnails (self.parser.page)

        eqn = "y = f(x)"

        text = "{$ %s $}" % (eqn)
        self.parser.toHtml (text)

        self.assertFalse (len (os.listdir (thumb.getThumbPath (False))) == 0)

        thumb.clearDir()

        self.assertEqual (len (os.listdir (thumb.getThumbPath (False))), 0)
コード例 #6
0
ファイル: test_thumbnails.py プロジェクト: sarutobi/outwiker
    def testThumbnailsClear1 (self):
        thumb = Thumbnails (self.parser.page)
        thumb.clearDir ()

        self.assertFalse (os.path.exists (thumb.getThumbPath (create=False)))