If I took a pregnancy test

If I took a Pregnancy test today and I had unprotective day one fertile sex 3 weeks ago  was it too soon to take a test