You have two things intermixed here. Test Driven Development and Unit Testing. You don't have to do them both - writing integration tests first is called ATDD or BDD and writing unit tests after the code is simply writing unit tests - but they work very well together.
Unit testing is all about testing small sections of code (normally a single method, but a unit is a flexible beast) and testing it in isolation. Taking our initial two methods above, this would change it to:
- I complete a [section of a] large script,
- I write a test that only hits the area I think is problematic
- Execute the tests
This means that you are not hacking away at your script, and thus don't risk forgetting to uncomment something. You also have a test that you can run again. This means you can be reasonably sure that a new change does not re-enable this bug. And that is a big deal; a test that is only ran once is useless. Tests should be repeatable and that is something hacking out sections of your code does not give you.
Test driven development is all about writing the tests before you write the code. This does add a large overhead, but when do you think it is cheapest to fix a bug? As you are writing that section of code or months later? This is the main reason for me using TDD. I get feedback on my code as I write it. Much less sending it to the testing team, waiting a week for them to run a set of tests against it and then having to be pulled of a different user story to try to work out what the hell I was thinking a week ago.
They also mean that you can refactor and be reasonably sure you not just stuffed everything up, help to make you think about the design of your code, act as documentation and various other bits of loveliness. But for me the killer feature of TDD is immediate feedback.