code: def test_val_check_interval_float_with_none_check_val_every_n_epoch():
      """Test that an exception is raised when `val_check_interval` is set to float with
      `check_val_every_n_epoch=None`"""
      with pytest.raises(
          MisconfigurationException,
          match="`val_check_interval` should be an integer when `check_val_every_n_epoch=None`",
      ):
          Trainer(
              val_check_interval=0.5,
              check_val_every_n_epoch=None,
          )
  
file_path: pytorch-lightning/tests/tests_pytorch/trainer/flags/test_val_check_interval.py
imports: import logging
  import pytest
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset, RandomIterableDataset
  from lightning.pytorch.trainer.trainer import Trainer
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch.utils.data import DataLoader
label_desc: Use image node_id 5 for calling a global function with example usage: test_val_check_interval_float_with_none_check_val_every_n_epoch() without return types