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

# Source Code for Module cssutils.tests.test_cssrulelist

     1  """
     2  testcases for cssutils.css.CSSRuleList
     3  """
     4  __author__ = '$LastChangedBy: doerwalter $'
     5  __date__ = '$LastChangedDate: 2007-08-02 22:58:23 +0200 (Do, 02 Aug 2007) $'
     6  __version__ = '0.9.2a1, $LastChangedRevision: 160 $'
     7
     8
     9  import basetest
    10
    11  import cssutils
    12
    13
    14 -class CSSRuleListTestCase(basetest.BaseTestCase):
    15
    16 -    def test_init(self):
    17          "CSSRuleList init"
    18          r = cssutils.css.CSSRuleList()
    19          self.assertEqual(0, r.length)
    20          self.assertEqual(None, r.item(2))
    21
    22          # subclasses list!
    23          r.append(0)
    24          r.append(1)
    25          self.assertEqual(2, r.length)
    26          self.assertEqual(1, r.item(1))
    27          self.assertEqual(None, r.item(2))
    28
    29
    30  if __name__ == '__main__':
    31      import unittest
    32      unittest.main()
    33