I'm pretty sure you don't have to tell them about your partner's health status unless it will require absence on your behalf outside of the scope of already regulated circumstances, e.g. pregnancy.
There are usually laws to protect you from being fired once you've notified your current employer about a pregnancy, but this company is not yet your employer. Some laws might enforce you to tell them about your current health status, but that's about how far it should go. If in doubt, and note that I'm not a lawyer, contact your union or consult with a lawyer.
Employees often fill out forms to notify their employer that they're expecting. If you don't do this and they find out before you do tell them they can fire you without you doing anything about it, it's unlikely but a possibility. Likewise telling them about the pregnancy right now, instead of waiting and turning in the form like everyone else, is probably a suicide for your application-process.
It could be ethically wrong on your behalf to accept a job knowing that you'll be away for quite some time if you know that they'll be unable to function during the time you think you won't be available. That's something you have to decide but if you think they can function without you during that period I'd carry on with the application, knowing that in the long term they'll benefit from your skills. Don't disclose personal information that can affect your job as long as its legal and in your opinion not morally wrong.
You're probably not breaking any laws by doing this, depending on where you live, and if they hire you and get pissed because of you not bring it up sooner just be happy to find out what kind of an employer you just got and find a new job. Just make sure you hand in an official notification before mentioning the pregnancy in the workplace to avoid getting fired if they don't like what you just did.
I'm making the assumption here that the country/state you're living in provides some sort of rights that's involved in the process around the birth. If you cannot handle a "no" on taking time off during the time of birth and there are no laws that obligate your employer to give you the leave then you'll probably have to bring it up during the interview, so that it's agreed that you'll be allowed to take the time off.