Did i test too early

My period is due in 3 days but I was so anxious to know if I was pregnant so I took a pregnancy test from dollar general took it one line which showed I wasn't is the test always accurate I mean my period isn't late yet