test_dataloader called during check_testing_model_configuration
🐛 Bug
When testing a model that has been loaded using the resume_from_checkpoint Trainer flag (note: .fit() has not been called yet in this case), the check_testing_model_configuration method calls test_dataloader(), which results in undefined attribute errors if the test dataloader depends on stuff set during prepare_data (which is called at the beginning of fit)
To Reproduce
Steps to reproduce the behavior:

Initialize a Trainer like trainer = Trainer(model, resume_from_checkpoint="...", ...) (make sure .fit is not called yet)
Run trainer.test()
If test dataloader depends on prepare_data, errors will be thrown that trace back to check_testing_model_configuration

Additional context
This seems like It could be fixed with a simple change--remove the model.test_dataloader() call from this line and replace hasattr with is_overriden call . I can submit a PR if this solution is acceptable.