In an ideal world where everything where everything is black and white, the answer could be "never". Relationships are, however, riddled with grey areas. Oftentimes, just yes or no answers will not suffice. So when is it time to stand by the truth and nothing but the truth, and when is it okay to sugar-coat it?
A quote by English poet William Blake says something to the effect that a truth told with bad intent beats all the lies you can invent.
A lie told to cover the other person on the other hand may be a good thing. However, the thing about lying is that more often than not, the truth comes out. It would seem wiser to tell the truth earlier than later. In doing so, your partner deals with the pain early and there is no fallout later.
Before making the decision to hold the truth from your significant other, ask your self whether you can stick by the lie. If you are not sure that you will continue to feel as you do about the situation, it is best to think of other truthful alternatives.
The other question to ask yourself is, can you explain yourself if you get caught? If you are thinking of lying to your partner and you won't come up with a reasonable explanation for it, then don't lie.
Remember that once one lie is uncovered, your partner will always wonder how truthful you are in the future.