Can sperm affect a pregnancy test? 🥺

Maybe a stupid question, but can sperm interfere with pregnancy test? We had intercourse a few hours ago and I decided to take a pregnancy test cause my ovulation has been all over the place, so I am wondering could that affect the result? 🥺