def test_missing_mandatory_parameters_fail(self, cfg: DictConfig) -> None:
        """Check that missing mandatory parameters fail to train."""
        mandatory_params = [
            'train_loader',
            'model',
            'tokenizer',
            'optimizer',
            'scheduler',
            'max_duration',
            'max_seq_len',
        ]
        for param in mandatory_params:
            orig_param = cfg.pop(param)
            with pytest.raises((
                TypeError,
                NameError,
                omegaconf.errors.InterpolationKeyError,
                omegaconf.errors.MissingMandatoryValue,
            )):
                train(cfg)
            cfg[param] = orig_param
Check that missing mandatory parameters fail to train.
tests/a_scripts/train/test_train_inputs.py