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: cthedot $'
     5  __date__ = '$LastChangedDate: 2007-10-19 15:10:03 +0200 (Fr, 19 Okt 2007) $'
     6  __version__ = '$LastChangedRevision: 535 $'
     7
     8  import basetest
     9  import cssutils
    10
    11 -class CSSRuleListTestCase(basetest.BaseTestCase):
    12
    13 -    def test_init(self):
    14          "CSSRuleList init"
    15          r = cssutils.css.CSSRuleList()
    16          self.assertEqual(0, r.length)
    17          self.assertEqual(None, r.item(2))
    18
    19          # subclasses list!
    20          r.append(0)
    21          r.append(1)
    22          self.assertEqual(2, r.length)
    23          self.assertEqual(1, r.item(1))
    24          self.assertEqual(None, r.item(2))
    25
    26
    27  if __name__ == '__main__':
    28      import unittest
    29      unittest.main()
    30