diff options
Diffstat (limited to 'tests/snippets/python2/test_cls_builtin.txt')
-rw-r--r-- | tests/snippets/python2/test_cls_builtin.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/snippets/python2/test_cls_builtin.txt b/tests/snippets/python2/test_cls_builtin.txt new file mode 100644 index 0000000..ff533c2 --- /dev/null +++ b/tests/snippets/python2/test_cls_builtin.txt @@ -0,0 +1,34 @@ +# Tests that a cls token gets interpreted as a Token.Name.Builtin.Pseudo + +---input--- +class TestClass(): + @classmethod + def hello(cls): + pass + +---tokens--- +'class' Keyword +' ' Text +'TestClass' Name.Class +'(' Punctuation +')' Punctuation +':' Punctuation +'\n' Text.Whitespace + +' ' Text +'@classmethod' Name.Decorator +'\n' Text.Whitespace + +' ' Text +'def' Keyword +' ' Text +'hello' Name.Function +'(' Punctuation +'cls' Name.Builtin.Pseudo +')' Punctuation +':' Punctuation +'\n' Text.Whitespace + +' ' Text +'pass' Keyword +'\n' Text.Whitespace |