Take a story's temperature by studying its tone. Is it hopeful? Cynical? Snarky? Playful?
Didactic
The allegorical names of characters in The Pilgrim's Progress give you a pretty clear sense of where Bunyan's sympathies lie. Introducing a character as Envy or Hypocrisy doesn't leave much room to wonder about which moral column they stand in for the author. And when a dude is called Hopeful, you know that he's going to back up his character with lines like this:
Hopeful: I do believe, as you say, that fear tends much to men's good, and to make them right, at their beginning to go on pilgrimage. (P846)
Basically "fear is good." How much more hopeful can you get?
This story is out to teach a lesson and doesn't try to hide it, which is why we call it didactic. Sometimes Bunyan is in such full-on professorial mode that he has his characters act out little lectures:
Christian: Without all doubt it doth, if it be right; for so says the Word, "The fear of the Lord is the beginning of wisdom."
Hopeful: How will you describe right fear?
Christian: True or right fear is discovered by three things:
1. By its rise; it is caused by saving convictions for sin.
2. It driveth the soul to lay fast hold of Christ for salvation.
3. It begetteth and continueth in the soul a great reverence of God, his Word, and ways, keeping it tender, and making it afraid to turn from them, to the right hand or to the left, to anything that may dishonour God, break its peace, grieve the Spirit, or cause the enemy to speak reproachfully. (P847-852)
Bunyan is basically saying "Listen up now, kids: this one is important. Take notes. Are you taking notes? I want to see those pencils moving."
But he does balance this out with some awesome fight scenes and crazy monsters—these mythical elements are the spoonful of sugar that really helps the didactic medicine go down.