Almost 3 weeks since sex? Pregnant?

Okay so it’s been almost 3 weeks since I’ve had unprotected sex and I get my period this Thursday I’m on the pill but I sometimes don’t take them at the right time. I can’t wait until I get my period to see if I’m pregnant or not so if I take a test today will it be accurate or not?