Anyone know?

Would taking a test 7 weeks after my last period give me a accurate result? I have super irregular periods, so idk when I ovulated. I was with someone other than my bf (while we were broken up) and I really don't want it to be his. I took a test 7 weeks since my last period and being with the other guy, and it was negative. Is that safe to day I'm not pregnant? Thank you