Might be good to test that the unit is actually a `Unit`, e.g.
```
expected_units = [None, Unit('pix'), Unit('pix'), Unit('mag'), Unit('mag'), None]
assert table[colname].unit == expected_units[i]
```
Note that this also protects against different but equivalent unit representations:
```
In [5]: Unit('mag * arcsec**(-2)') == Unit('mag / arcsec2')
Out[5]: True
```