class_docstr: Tests that check if the dataset parameters in the config achieve the desired effect.
class_docstr_tok: ["Tests","that","check","if","the","dataset","parameters","in","the","config","achieve","the","desired","effect","."]
docstr: Test if the image size parameter works as expected.
code: def test_image_size(
      self,
      input_size,
      effective_image_size,
      category="shapes",
      path=None,
  ):
      """Test if the image size parameter works as expected."""
      configurable_parameters = get_test_configurable_parameters(
          dataset_path=path, model_name="stfpm"
      )
      configurable_parameters.dataset.category = category
      configurable_parameters.dataset.image_size = input_size
      configurable_parameters = update_input_size_config(
          configurable_parameters
      )
  
      data_module = get_datamodule(configurable_parameters)
      data_module.setup()
      assert (
          next(iter(data_module.train_dataloader()))["image"].shape[-2:]
          == effective_image_size
      )
  
imports: import os
  import numpy
  import pytest
  from anomalib.config import update_input_size_config
  from anomalib.data import Avenue, BTech, Folder, MVTec, ShanghaiTech, UCSDped, Visa, get_datamodule
  from anomalib.data.utils import DirType
  from anomalib.pre_processing.transforms import Denormalize, ToNumpy
  from tests.helpers.config import get_test_configurable_parameters
  from tests.helpers.dataset import TestDataset, get_dataset_path
label_desc: Use image node_id 1 for calling the TestConfigToDataModule obj's underlying member method code with example usage: obj.test_image_size(input_size, effective_image_size, category, path) without return types