1 """Testcase for cssutils imports"""
2 __version__ = '$Id: test_cssutilsimport.py 1116 2008-03-05 13:52:23Z cthedot $'
3
4 before = len(locals())
5 from cssutils import *
6 after = len(locals())
7
8 import unittest
9
11
13 "from cssutils import *"
14 import cssutils
15
16 act = globals()
17 exp = {'CSSParser': CSSParser,
18 'CSSSerializer': CSSSerializer,
19 'css': cssutils.css,
20 'stylesheets': cssutils.stylesheets,
21 }
22 exptotal = before + len(exp) + 1
23
24 self.assert_(after == exptotal, 'too many imported')
25
26 found = 0
27 for e in exp:
28 self.assert_(e in act, '%s not found' %e)
29 self.assert_(act[e] == exp[e], '%s not the same' %e)
30 found += 1
31 self.assert_(found == len(exp))
32
33 if __name__ == '__main__':
34 import unittest
35 unittest.main()
36