Boris Johnson's push for an early election was thrown out before parliament was suspended for five weeks.