pregnancy test!

BIBI
So I was a little bit silly and never used a condom a few times while I was ovulating ... How soon will taking a pregnancy be affective? It's 4 days until my period, but it's never regular... And I had unprotected sex around 2 weeks ago now... I'm going to buy one now, but don't know if it'll even work yet? HELP!