Package cssutils :: Package tests :: Module test_scripts_csscombine |
[hide private]
[frames] | no frames]

# Source Code for Module cssutils.tests.test_scripts_csscombine

     1  """
     2  testcases for cssutils.scripts.csscombine
     3  """
     4  __author__ = '$LastChangedBy: cthedot $'
     5  __date__ = '$LastChangedDate: 2008-01-12 21:28:54 +0100 (Sa, 12 Jan 2008) $'
     6  __version__ = '$LastChangedRevision: 831 $'
     7
     8  import os
     9  import basetest
    10  from cssutils.scripts import csscombine
    11  import cssutils
    12
    13 -class CSSCombine(basetest.BaseTestCase):
    14
    15 -    def test_combine(self):
    16          "scripts.csscombine"
    17          csspath = os.path.join(os.path.dirname(__file__), '..', '..', '..',
    18                                 'sheets', 'csscombine-proxy.css')
    19          combined = csscombine(csspath)
    20          self.assertEqual(combined,
    21                           '@charset "utf-8";a{color:green}body{color:#fff;background:#000}'
    22                           )
    23          combined = csscombine(csspath, targetencoding='ascii')
    24          self.assertEqual(combined,
    25                           '@charset "ascii";a{color:green}body{color:#fff;background:#000}'
    26                           )
    27
    28          cssutils.log.raiseExceptions = True
    29
    30 -    def tearDown(self):
    31          # needs to be re-enabled here for other tests
    32          cssutils.log.raiseExceptions = True
    33          # no needed as csscombine uses own serializer
    34          # cssutils.ser.prefs.useDefaults()
    35
    36
    37  if __name__ == '__main__':
    38      import unittest
    39      unittest.main()
    40