Gynecologist

Do the gynecologist test your pee for pregnancy even if you didn't specifically ask them to? He said they take it to test for any infections but would it show if I'm pregnant or not?