A Texas judge cannot grant your divorce if you or your spouse are pregnant.  However, you can file for divorce (start the case) while being pregnant.  You can create a settlement with your spouse while being pregnant.  These however cannot be finalized until after the child is born.

Likewise, a Texas Judge cannot grant your divorce case if you or your spouse are in a pending bankruptcy suit.  The only way to get a divorce completed during a bankruptcy is if your bankruptcy lawyer files a Motion to Stay Bankruptcy proceedings and obtains an order which can be presented in divorce court.  Otherwise, the judge will need you to complete the entire bankruptcy suit prior to granting the divorce.  It is common practice for a Texas judge to ask at your final hearing whether you are pending in a bankruptcy proceeding, and you will be under oath when testifying as to your answer.  It is best practice to wait until after a bankruptcy is done to get divorced.  Nothing however prevents you from filing for divorce during the bankruptcy.  You simply cannot finish it.