code: def test_check_size(self):
      # Checking that the _check_size function throws value errors when we want it to
      with pytest.raises(ValueError):
          Image.new("RGB", 0)  # not a tuple
      with pytest.raises(ValueError):
          Image.new("RGB", (0,))  # Tuple too short
      with pytest.raises(ValueError):
          Image.new("RGB", (-1, -1))  # w,h < 0
  
      # this should pass with 0 sized images, #2259
      im = Image.new("L", (0, 0))
      assert im.size == (0, 0)
  
      im = Image.new("L", (0, 100))
      assert im.size == (0, 100)
  
      im = Image.new("L", (100, 0))
      assert im.size == (100, 0)
  
      assert Image.new("RGB", (1, 1))
      # Should pass lists too
      i = Image.new("RGB", [1, 1])
      assert isinstance(i.size, tuple)
  
imports: import io
  import os
  import shutil
  import sys
  import tempfile
  import pytest
  from PIL import Image, ImageDraw, ImagePalette, UnidentifiedImageError
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar_tofile, assert_not_all_same, hopper, is_win32, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 34 for calling the TestImage obj's underlying member method code with example usage: obj.test_check_size() without return types