This is called Wishful Thinking. It is a way to confirm the bias they have against themselves.

If someone has the Limiting Belief “I am a failure” or “I can’t succeed”, what they will do is only look for evidence to support feeling and believing this way. They could fail a test or get dumped (or any other similar situation) and all they would do is look for evidence to support their “I’m a failure” belief. This is called Wishful Thinking. It is a way to Confirm the Bias they have against themselves. They will always be scanning their environment and looking for evidence to support feeling and believing their Limiting Beliefs.