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

Source Code for Module cssutils.tests.test_scripts_csscombine

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