docstr: Test that tokens are split with types as expected.
docstr_tok: ["Test","that","tokens","are","split","with","types","as","expected","."]
code: def testTokenTypes(self):
      """Test that tokens are split with types as expected."""
      for source, expected in (
          (
              "a && b || c",
              [
                  ("a", "a"),
                  ("&&", "c"),
                  ("b", "a"),
                  ("||", "c"),
                  ("c", "a"),
              ],
          ),
      ):
          s = shlex.shlex(source, punctuation_chars=True)
          observed = []
          while True:
              t = s.get_token()
              if t == s.eof:
                  break
              if t[0] in s.punctuation_chars:
                  tt = "c"
              else:
                  tt = "a"
              observed.append((t, tt))
          self.assertEqual(observed, expected)
  
imports: import io
  import itertools
  import shlex
  import string
  import unittest
label_desc: Use image node_id 12 for calling the ShlexTest obj's underlying member method code with example usage: obj.testTokenTypes() without return types