Her status/extended stay would depend on the immigration status of the spouse she is getting married to.
Also, getting married as a visitor + getting pregnant while visiting..... would make IRCC to suspect if the relationship is genuine + if the person is doing this to immigrate/to remain long-term in Canada.
If she is pregnant, she won't be able to give the chest x-rays i.e. she will not able to complete the medicals if she applies to extend her visitor status (by any immigration or extension route)