In many states you may not file for divorce if one of the parties is pregnant. California does not prevent you from filing but your divorce process may take longer and be more complicated.
California has a mandatory six-month waiting period before a divorce can be finalized. This is one mechanism to assure that all the children in the marriage are addressed in the divorce. In many cases the child will be born during the waiting period if the wife is pregnant at the time of filing.
California offers married couples or domestic partners the option to file a "summary dissolution." A summary dissolution is faster and easier than a normal divorce. You may not file a summary dissolution if either party is pregnant.
If one of the parties is pregnant, the divorce may be filed in California but will not be finalized until the baby is born. Divorce laws attempt to establish paternity or parentage for all children and therefore favor a child being born during the marriage whenever possible.