Without coming across as a “message” movie or appearing to have any agenda at all, “Unexpected” underscores the vastly different experiences that a middle-class white woman and an inner-city black teen might have being pregnant in America. So light is the film’s touch, though, that you could miss its observations on class disparity and enjoy it as nothing more than a good-natured, uncluttered comedy about life’s happy surprises.

Cobie Smulders stars as Samantha Abbott, a cool white science teacher at a mostly black Chicago high school, who discovers that she and her long-term boyfriend, John (Anders Holm), are expecting a baby. They’ve been inching toward marriage anyway, so John does the old-fashioned thing and proposes. One quickie courthouse wedding later, they’re a traditional nuclear family.

Sam soon learns that one of her students, a promising but poor girl named Jasmine (Gail Bean), is also pregnant. Jasmine’s going to keep the baby (the a-word comes up), but she assumes it nullifies her college plans. Sam pushes her to apply anyway, with ambitious talk of scholarships and on-campus family housing. In her own life, Sam must find a new job (the school is closing) and figure out her plan for balancing work and family when the baby comes.

These two uncertain but resilient women form a comfortable bond as they gestate together, but their lives are very different. While Sam and John are at an ultrasound appointment, weeping with happiness, Jasmine is at the welfare office with her grandmother and cousin, trying to get more assistance for the new mouth they’ll have to feed. The film’s writer-director, Kris Swanberg (wife of indie stalwart Joe Swanberg), worked as a Chicago public school teacher, and you can see it in the details as Sam tries to get Jasmine the help she needs. Sam’s story is ultimately the focus, but her mentor-sister relationship with Jasmine is what makes the movie special.

Warm, friendly, and often very funny, “Unexpected” is cheerfully free of any major drama. None of the relationships are toxic, and most are sincere and loving. The only obstacles or setbacks in the story are the ones inherent to (or at least typical of) unplanned pregnancies, and even those tend to get resolved quickly and smoothly. It’s worse for someone of Jasmine’s age and socio-economic status, but Swanberg doesn’t play that up much. She prefers to keep things low-key, and to emphasize the positivity and joy of impending motherhood, which spans all classes and cultures. That, plus the authentic, likable performances and funny writing, add up to a film that radiates pleasant optimism.

B (1 hr., 30 min.; R, a lot of harsh profanity.)

Originally published at Vanity Fair.