diff options
| author | Oleh Prypin <oleh@pryp.in> | 2021-01-18 20:39:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-18 20:39:02 +0100 |
| commit | f0445be718da83541ea3401aad882f3937147263 (patch) | |
| tree | 26bd361a410d8bea33ce259321fad63e7f3c61af /tests/lexers/python2 | |
| parent | 423c44a451db7e5f63147b1c1519661d745fc43a (diff) | |
| download | pygments-git-f0445be718da83541ea3401aad882f3937147263.tar.gz | |
Replace tests that assert on token output with auto-updatable samples (#1649)
Diffstat (limited to 'tests/lexers/python2')
| -rw-r--r-- | tests/lexers/python2/test_cls_builtin.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/lexers/python2/test_cls_builtin.txt b/tests/lexers/python2/test_cls_builtin.txt new file mode 100644 index 00000000..333845d8 --- /dev/null +++ b/tests/lexers/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 + +' ' Text +'@classmethod' Name.Decorator +'\n' Text + +' ' Text +'def' Keyword +' ' Text +'hello' Name.Function +'(' Punctuation +'cls' Name.Builtin.Pseudo +')' Punctuation +':' Punctuation +'\n' Text + +' ' Text +'pass' Keyword +'\n' Text |
