Is my pregnancy test accurate?

My period is 7 days late so I took a pregnancy test. But I want to make sure it’s accurate because I went to pee at 4/5 am then I just did the test now at 9 am. Would that be accurate? Might be a stupid question, but I’m only asking because I thought it had to be pee from the whole night before, but I peed at 4/5 am.