docstr: Test that with whitespace_split, behaviour is as expected
docstr_tok: ["Test","that","with","whitespace_split",",","behaviour","is","as","expected"]
code: def testPunctuationWithWhitespaceSplit(self):
      """Test that with whitespace_split, behaviour is as expected"""
      s = shlex.shlex("a  && b  ||  c", punctuation_chars="&")
      # whitespace_split is False, so splitting will be based on
      # punctuation_chars
      self.assertEqual(list(s), ["a", "&&", "b", "|", "|", "c"])
      s = shlex.shlex("a  && b  ||  c", punctuation_chars="&")
      s.whitespace_split = True
      # whitespace_split is True, so splitting will be based on
      # white space
      self.assertEqual(list(s), ["a", "&&", "b", "||", "c"])
  
imports: import io
  import itertools
  import shlex
  import string
  import unittest
label_desc: Use image node_id 14 for calling the ShlexTest obj's underlying member method code with example usage: obj.testPunctuationWithWhitespaceSplit() without return types