Actually, they hid their preparations from us by covering up their work at the necessary times. The test itself was detected right away.
The Indians aren't stupid, and they're technically very adept. It would be easy for them to identify which sunsych satellites were our spy birds. The only way you can really deal with that stuff is to either keep shifting your flyover times (very expensive in terms of propellant) or to have so many flying over that it does them no good to hide from any given satellite.
Anyway, it proves my point at the beginning of the article i.e., if the North Koreans think they can hide their nuke test by doing an underground test, they'l fail.
About the Indian tests, I do not think it was detected as a nuclear test until much later, when the Indian government annnounced news of the test. What was instantly revealed as data about the nuke test was seismological data, and it is not very easy to tell apart a nuke test from an earth tremor.
But I did think that the failure to detect the Indian tests was a major issue, with several articles posted right here on FR about it. Was it all just 'wink-wink'? If you have any info about it being otherwise, I'd be grateful if you gave me the link/s to it.