If a person changes their property from "partial" rental to full home for 3 years and sells what are the tax implications?

Potential scenario:

Lived in a large home that had 3 units.  Lived in one unit that was 1/2 of the building.  Depreciated the rental portion of the home (1/2 of the building) for 20 years, so there are 7 years left that we can still depreciate as I understand.  If one turns the property into a single home (which can be done easily) for 3 years and sells the property, do you pay capital gains from the rental portion, or just as you might from the sale of your own home?