No period?

If I don’t have a period how long after sex should I take a test?