Bring some tests over from a branch.
Merge branch 'master' into type-specialized-attrs