code: def test_tuple_array_dumps(self):
      t = (1, 2, 3)
      expect = json.dumps(list(t))
      # Default is True
      self.assertEqual(expect, json.dumps(t))
      self.assertEqual(expect, json.dumps(t, tuple_as_array=True))
      self.assertRaises(TypeError, json.dumps, t, tuple_as_array=False)
      # Ensure that the "default" does not get called
      self.assertEqual(expect, json.dumps(t, default=repr))
      self.assertEqual(
          expect, json.dumps(t, tuple_as_array=True, default=repr)
      )
      # Ensure that the "default" gets called
      self.assertEqual(
          json.dumps(repr(t)),
          json.dumps(t, tuple_as_array=False, default=repr),
      )
  
imports: import unittest
  from simplejson.compat import StringIO
  import simplejson
label_desc: Use image node_id 1 for calling the TestTuples obj's underlying member method code with example usage: obj.test_tuple_array_dumps() without return types