There’s a joke going around the various warring tribes in the Tory leadership contest. They might not win this time, they tell each other, but not to worry: ‘We’ll all meet again in November.’ The point is that whoever succeeds Theresa May is doomed: the 31 October deadline will pass not with Britain leaving the European Union but with a political crisis and a general election that will be won by Jeremy Corbyn. After that, the Tories will in a few months go through the whole process again — this time to pick a leader of the opposition. ‘We’re using this leadership campaign as a test run for when the whole thing collapses in the autumn,’ says one aide.

Some MPs are more optimistic and think the next prime minister will survive until Christmas — but generally, no one is at all sure how this will be resolved. The European Union is refusing point blank to change its Brexit deal, and parliament is full of MPs who suggest they’ll sooner vote down the government than allow a no-deal Brexit. Add to the mix a new leader ruling out any delay to Brexit and you get either a last-minute breakthrough or a collapse. Many Tories predict the latter.

As one MP puts it: ‘Despite all the noise about moderate Tories coming out for Brexiteers, the parliamentary arithmetic [for a Brexit solution] has not changed.’ Only an election could change it.

Boris Johnson remains clear favourite to succeed May, in part because of his uncompromising Brexit position. Staying in the EU beyond 31 October, he says, could lead to the extinction of the party. With the exception of Esther McVey, all the candidates have promised to seek a new deal with the EU, but May is telling MPs that is a fantasy.

Gavin Barwell, her Chief of Staff, poured cold water on the idea this week, saying there simply isn’t enough time. He told the soon-to-be-dissolved cabinet that European holidays mean a deal could only be negotiated between 2 September and 31 October with just 24 sitting days in parliament. No. 10’s most optimistic target of getting May’s deal through parliament was seven weeks.

Not everyone around the table was convinced. One cabinet minister dismisses Barwell’s warning as proof that he is a ‘processologist’ who overlooked the fact that a Brexiteer prime minister can leave with or without a deal. ‘The problem with no deal last time was not that MPs would not do it, it was that the Prime Minister would not do it.’ Brexiteers have found hope in an Institute for Government report which said that a new Conservative prime minister determined to take Britain out of the EU without a deal ‘cannot be stopped by parliament’.

But MPs have other ideas. They place their faith in John Bercow, the Speaker, who has said the idea parliament wouldn’t get a say in the matter is ‘for the birds’. With the power to bend parliament’s rules, he’s a powerful advocate for Remain. Chief Whip Julian Smith told cabinet this week that the IfG report is wrong as it doesn’t take into account the fact that the government faces an activist speaker. The Tory Remainers are in talks with Labour to work out how they could stop a prime minister suspending parliament to deliver Brexit, as has been suggested by Dominic Raab. No matter that Johnson has said he would not resort to such tactics: the anti no-deal MPs are keen, above all, to show they’re ready.

The clearest route to stopping no deal is for MPs to vote no confidence in the government and thereby trigger a general election. Or the new prime minister might call a general election of his or her own accord were parliament to block their Brexit plans. The gamble? Outraged Leave voters will restore the Tory majority. For many in the Tory party, this is seen as less dangerous than delaying Brexit again. ‘To delay would be death by a thousand cuts,’ says one cabinet minister. ‘A general election on a clear Brexit platform is not the worst option.’ Many cabinet members would rather a second referendum than a general election — allowing the party to stay in power as the Brexit deadlock is resolved. A few Tories fantasise about Labour being forced to back Remain, thereby alienating many of its northern voters. An annoyed country could back Brexit by a larger margin. However, this is regarded as too dangerous by the bulk of the party: it was May’s decision to consider a second referendum that hastened her demise.

I chaired the One Nation hustings last week where prospective leadership candidates were asked about this. Johnson ruled it out as ‘anti-democratic’: ‘I don’t want to see our country go through that again.’

But the Conservative party is out of good options and must now choose the least worst. If there is a no-deal Brexit, and parliament fails to stop it, how would the new prime minister get all of the necessary legislation through? Or pass any other laws of any importance? The more Tory MPs look to the future, the more an election looks inevitable. Indeed, many of Johnson’s supporters privately admit that they are backing him because they see him as the best man for that election: the leader to beat Jeremy Corbyn and Nigel Farage. A ComRes poll this week predicted that the Tories would do far better in a general election with Johnson as leader than any other candidate.

Should that election come and the Tories fail, expect the November leadership race to have an even longer list of candidates. The line-up will no doubt include some of those who’ll be kicked out of the contest next week — they will probably keep campaigning on the side. Don’t be surprised if Rory Stewart turns up in a park near you over the summer with a camera phone or Matt Hancock launches another app.

But those Tories looking for a second stab should bear something in mind. Ahead of the 2015 general election, there was a widespread view that David Cameron would lose — and Boris Johnson would be brought in to save the day. Things didn’t work out the way people expected. Since then, a general rule has held true for British politics: no proposition is so outlandish that it could not actually happen. A Tory success still can’t be ruled out.

'We're using this leadership campaign as a test run for when the whole thing collapses,’ says one aide