Citizen or Resident Test

Assuming all other dependency tests are met, the citizen or resident test allows taxpayers to claim a dependency exemption for persons who are U.S. citizens for some part of the year or who live in the United States, Canada, or Mexico for some part of the year.

Source: Internal Revenue Service