Yamkala Sapkota, 30, of Gordon Street, had taken 90 lessons hoping to secure a licence and the cost had put increasing pressure on her family’s finances.
After failing to tell her husband that she was taking her test for the fourth time, Mrs Sapkota came home and told her partner that she had once again flunked the test.
A row then broke out during which the mother-of-three poured white spirit over her clothes and set herself alight, aiming to kill herself.
The resulting blaze was so intense that her second-floor flat was badly damaged.
Firefighters attending the scene kicked in the doors of several of her neighbours and numerous properties suffered smoke damage as a result.
One neighbour, who asked to not be named, said: “How selfish can you be? She could have killed not only herself and her family but the eight other families in the block too.”
Another neighbour added: “All for the sake of a driving licence. She should have just given up on trying to drive.”
However ground-floor neighbour, Walter Manclark, 64, was more forgiving. He said: “I’ve never had any trouble with them. Everybody has a trigger and you never know when something can tip you over the edge.”
Sapkota pleaded guilty at the High Court in Edinburgh on Thursday to a charge of reckless and culpable conduct, in front of judge Lord Bannatyne.
Prosecution lawyer Stephen O’Rourke told the court that Sapkota, a first offender, was extremely upset on June 28 last year.
The court heard that her husband worked as a chef and earned very little money – a significant proportion of the cash being brought home was spent on her driving lessons.
Mr O’Rourke said: “Her husband told her to ‘die if you want’. She was very upset by this and took herself through to the bedroom where she poured white spirit on herself and set herself alight.
“Prior to setting herself on fire, the accused had left a suicide note which stated that she no longer wished to live.”
Mr O’Rourke added: “As a result of her actions, the accused suffered 12 per cent burns to her face, head, neck, shoulder, right arm and back.”
He said she was kept in hospital for just under two months and had undergone a series of skin grafts and operations.
Lord Bannatyne deferred sentence for reports until later this month.