astropy/astropy — pull request #2112 by mdboom (2014-02-21 14:45:06+00:00)
Title: --coverage does not measure complete coverage

The ``pytest-cov`` plugin is buggy because it only measures coverage after pytest has started up, by which point some files in astropy have already been imported. This leads the following kind of coverage issues:

![screen shot 2014-02-21 at 11 10 56 am](https://f.cloud.github.com/assets/314716/2228725/a713aa62-9ae0-11e3-84eb-7c079c085e70.png)

Using:

```
coverage run --source astropy -m py.test astropy
```

instead works much better since it does not care at what point py.test started up. I think we should consider removing the ``--coverage`` option unless we can solve this, and recommend that coverage tests be done via the ``coverage`` command. For now, we should also fix ``.travis.yml`` (I'll see to this).