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,
        )
Test that an exception is raised when `val_check_interval` is set to float with
    `check_val_every_n_epoch=None`
tests/tests_pytorch/trainer/flags/test_val_check_interval.py