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

# Source Code for Module cssutils.tests.test_token

     1  # -*- coding: iso-8859-1 -*-
     2  """
     3  testcases for cssutils.token.Token
     4  """
     5  __author__ = '$LastChangedBy: doerwalter $'
     6  __date__ = '$LastChangedDate: 2007-08-02 22:58:23 +0200 (Do, 02 Aug 2007) $'
     7  __version__ = '0.9.2a1, $LastChangedRevision: 160 $'
     8
     9  import xml.dom
    10
    11  import basetest
    12
    13  from cssutils.token import Token
    14
    15
    16 -class TokenTestCase(basetest.BaseTestCase):
    17
    18 -    def test_init(self):
    19          "Token.init()"
    20          t = Token(1, 2, Token.IDENT, u'c\olor')
    21          self.assertEqual(1, t.line)
    22          self.assertEqual(2, t.col)
    23          self.assertEqual(Token.IDENT, t.type)
    24          self.assertEqual(u'c\olor', t.value)
    25          # self.assertEqual(u'c\olor', t.literal) # REMOVED
    26          self.assertEqual(u'color', t.normalvalue)
    27
    28
    29  if __name__ == '__main__':
    30      import unittest
    31      unittest.main()
    32