Debian Codegraph @

pypy/module/token/test/apptest_token.py

raw symbols SCIP
1 import token
2
3 def test_isterminal():
4 assert token.ISTERMINAL(token.ENDMARKER)
5 assert not token.ISTERMINAL(300)
6
7 def test_isnonterminal():
8 assert token.ISNONTERMINAL(300)
9 assert not token.ISNONTERMINAL(token.NAME)
10
11 def test_iseof():
12 assert token.ISEOF(token.ENDMARKER)
13 assert not token.ISEOF(token.NAME)
14
15 def test_nl_and_comment_exist_in_all():
16 assert "NL" in token.__all__
17 assert "COMMENT" in token.__all__
18
19 def test_encoding_exists():
20 assert token.ISTERMINAL(token.ENCODING)
21
22 def test_exact_token_types():
23 assert token.EXACT_TOKEN_TYPES[":="] == token.COLONEQUAL
24
25 def test_old_not_equal_is_gone():
26 assert "<>" not in token.EXACT_TOKEN_TYPES
27 assert "!=" in token.EXACT_TOKEN_TYPES
28 assert token.EXACT_TOKEN_TYPES["!="] == token.NOTEQUAL
29
30 def test_soft_keyword_exists():
31 assert token.ISTERMINAL(token.SOFT_KEYWORD)