pregnancy test

would a pregnancy test give you accurate results if you're on the pill or do the hormones in the pill alter results?