astropy/astropy — pull request #457 by jiffyclub (2012-11-06 19:35:06+00:00)
Title: Correct pytest imports

While browsing some of our tests I noticed a few instances of `import pytest`. As described in the [developer documentation](http://docs.astropy.org/en/latest/development/testguide.html#using-py-test-helper-functions) pytest should be imported as `from ...tests.helper import pytest` so that the most contextually appropriate pytest installation is always used.

Here's a list of instances of `import pytest`:

```tcsh
mrdavis:~/<2>astropy > find . -type f -name "*.py" | xargs grep "^import pytest"
./cosmology/tests/test_cosmology.py:import pytest
./io/ascii/tests/test_connect.py:import pytest
./nddata/tests/test_flag_collection.py:import pytest
./nddata/tests/test_nddata.py:import pytest
./table/tests/test_init_table.py:import pytest
./table/tests/test_item_access.py:import pytest
./table/tests/test_pprint.py:import pytest
./table/tests/test_row.py:import pytest
./table/tests/test_table.py:import pytest
./table/tests/test_table_io.py:import pytest
./tests/test_logger.py:import pytest
./time/tests/test_basic.py:import pytest
./time/tests/test_delta.py:import pytest
./time/tests/test_guess.py:import pytest
./units/tests/test_units.py:import pytest
./wcs/tests/test_wcsprm.py:import pytest
```

I can tackle this if no one else volunteers.