Package cssutils :: Package tests :: Module test_tokenize2 :: Class TokenizerTestCase |
[hide private]
[frames] | no frames]

# Class TokenizerTestCase

source code

           object --+
                    |
    unittest.TestCase --+
                        |
    basetest.BaseTestCase --+
                            |
                           TokenizerTestCase

Nested Classes | [hide private]
Inherited from `unittest.TestCase`: `failureException`

Instance Methods | [hide private]
setUp(self) Hook method for setting up the test fixture before exercising it. | source code
test_linenumbers(self) Tokenizer line + col | source code
test_tokenize(self) cssutils Tokenizer().tokenize() | source code
test_tokenizefullsheet(self) cssutils Tokenizer().tokenize(fullsheet=True) | source code
test_tokenizeCSS3(self) CSS3 Tokenizer().tokenize() | source code
test_tokenizeCSS2_1(self) CSS2 Tokenizer().tokenize() | source code
__old(self) | source code
Inherited from `basetest.BaseTestCase`: `assertRaisesEx`, `assertRaisesMsg`, `do_equal_p`, `do_equal_r`, `do_raise_p`, `do_raise_r` Inherited from `unittest.TestCase`: `__call__`, `__init__`, `__repr__`, `__str__`, `assertAlmostEqual`, `assertAlmostEquals`, `assertEqual`, `assertEquals`, `assertFalse`, `assertNotAlmostEqual`, `assertNotAlmostEquals`, `assertNotEqual`, `assertNotEquals`, `assertRaises`, `assertTrue`, `assert_`, `countTestCases`, `debug`, `defaultTestResult`, `fail`, `failIf`, `failIfAlmostEqual`, `failIfEqual`, `failUnless`, `failUnlessAlmostEqual`, `failUnlessEqual`, `failUnlessRaises`, `id`, `run`, `shortDescription`, `tearDown` Inherited from `unittest.TestCase` (private): `_exc_info` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Class Variables | [hide private]
| testsall = ``{``u'``\t``'``:` `[``(``'``S``'``,` `u'``\t``'``,` 1`,` 1`)``]``,` `u'``\n``'``:` `[``(``'``S``'``,` `u'``\n``'``,` `...``
| tests3 = ``{``u'``$=` `'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``SUFFIXMATCH``'``,` `u'``$=``'``,` `...``
| tests2 = ``{``u'``!important` `'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``CHAR``'``,` `u'``!``'``,` `...``
| tests2only = ``{``u'``+` `'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``PLUS``'``,` `u'``+``'``,` 1`,` 2`)``...``
| testsfullsheet = ``{``u'``"\na``'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``INVALID``'``,` `u'``...``
| testsfullsheetfalse = ``{``u'``"` `'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``INVALID``'``,``...``
| testsfullsheettrue = ``{``u'``"` `'``:` `[``(``'``S``'``,` `u'``` `'``,` 1`,` 1`)``,` `(``'``STRING``'``,` `u``...``

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### setUp(self) | source code
Hook method for setting up the test fixture before exercising it. Overrides: basetest.BaseTestCase.setUp

Class Variable Details | [hide private]

  ### testsall Value:
      {u'\t': [('S', u'\t', 1, 1)],
       u'''
      ''': [('S', u'\n', 1, 1)],
       u'\x0c': [('S', u'\x0c', 1, 1)],
       u'\r': [('S', u'\r', 1, 1)],
       u'''\r
      ''': [('S', u'\r\n', 1, 1)],
       u'''\r
      ...

  ### tests3 Value:
      {u' $= ': [('S', u' ', 1, 1),
                 ('SUFFIXMATCH', u'$=', 1, 2),
                 ('S', u' ', 1, 4)],
       u' *= ': [('S', u' ', 1, 1),
                 ('SUBSTRINGMATCH', u'*=', 1, 2),
                 ('S', u' ', 1, 4)],
       u' + 0 ': [('S', u' ', 1, 1),
                  ('CHAR', u'+', 1, 2),
      ...

  ### tests2 Value:
      {u' !important ': [('S', u' ', 1, 1),
                         ('CHAR', u'!', 1, 2),
                         ('IDENT', u'important', 1, 3),
                         ('S', u' ', 1, 12)],
       u''' "\\na"
      a''': [('S', u' ', 1, 1),
             ('STRING', u'"\\na"', 1, 2),
             ('S', u'\n', 1, 7),
      ...

  ### tests2only Value:
      {u' + ': [('S', u' ', 1, 1), ('PLUS', u'+', 1, 2), ('S', u' ', 1, 3)],
       u' , ': [('S', u' ', 1, 1), ('COMMA', u',', 1, 2), ('S', u' ', 1, 3)]
      ,
       u' . ': [('S', u' ', 1, 1), ('CLASS', u'.', 1, 2), ('S', u' ', 1, 3)]
      ,
       u' > ': [('S', u' ', 1, 1),
                ('GREATER', u'>', 1, 2),
                ('S', u' ', 1, 3)],
      ...

  ### testsfullsheet Value:
      {u''' "
      a''': [('S', u' ', 1, 1),
             ('INVALID', u'"', 1, 2),
             ('S', u'\n', 1, 3),
             ('IDENT', u'a', 2, 1)],
       u''' "\\na
      a''': [('S', u' ', 1, 1),
             ('INVALID', u'"\\na', 1, 2),
      ...

  ### testsfullsheetfalse Value:
      {u' " ': [('S', u' ', 1, 1), ('INVALID', u'" ', 1, 2)],
       u' 'abc"with quote" in it': [('S', u' ', 1, 1),
                                    ('INVALID',
                                     u''abc"with quote" in it',
                                     1,
                                     2)],
       u'/*': [('CHAR', u'/', 1, 1), ('CHAR', u'*', 1, 2)],
       u'url("a': [('FUNCTION', u'url(', 1, 1), ('INVALID', u'"a', 1, 5)],
      ...

  ### testsfullsheettrue Value:
      {u' " ': [('S', u' ', 1, 1), ('STRING', u'" "', 1, 2)],
       u' 'abc"with quote" in it': [('S', u' ', 1, 1),
                                    ('STRING',
                                     u''abc"with quote" in it'',
                                     1,
                                     2)],
       u'/*': [('COMMENT', u'/**/', 1, 1)],
       u'url( "a ': [('URI', u'url( "a ")', 1, 1)],
      ...