class_docstr: Token class.
class_docstr_tok: ["Token","class","."]
docstr: Test a token against a token expression.  This can either be a
  token type or ``'token_type:token_value'``.  This can only test
  against string values and types.
docstr_tok: ["Test","a","token","against","a","token","expression",".","This","can","either","be","a","token","type","or","``","'token_type",":","token_value","'","``",".","This","can","only","test","against","string","values","and","types","."]
code: def test(self, expr):
      """Test a token against a token expression.  This can either be a
      token type or ``'token_type:token_value'``.  This can only test
      against string values and types.
      """
      # here we do a regular string equality check as test_any is usually
      # passed an iterable of not interned strings.
      if self.type == expr:
          return True
      elif ":" in expr:
          return expr.split(":", 1) == [self.type, self.value]
      return False
  
imports: import re
  from ast import literal_eval
  from collections import deque
  from operator import itemgetter
  from ._compat import implements_iterator
  from ._compat import intern
  from ._compat import iteritems
  from ._compat import text_type
  from .exceptions import TemplateSyntaxError
  from .utils import LRUCache
label_desc: Use image node_id 3 for calling the Token obj's underlying member method code with example usage: obj.test(expr) and returns: False, True, unknown