astropy/astropy — pull request #2317 by cdeil (2014-04-19 13:56:50+00:00)
Title: Add `--tests --runslow` option and mark coordinates precision tests as slow

Some of the Astropy tests take > 10 seconds to execute and in my opinion should be skipped by default.

Specifically the tests in `astropy/coordinates/tests/accuracy` aren't really unit tests that need to be run all the time by every developer.

Here's the 10 slowest tests I find on my Macbook via
```
$ python setup.py test -a --durations=10
```
```
39.07s call astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py::test_fk4_no_e_fk5
28.15s call astropy/coordinates/tests/accuracy/test_galactic_fk4.py::test_galactic_fk4
27.33s call astropy/coordinates/tests/accuracy/test_icrs_fk5.py::test_icrs_no_e_fk5
12.40s call astropy/io/fits/tests/test_image.py::TestImageFunctions::test_lossless_gzip_compression
4.81s call astropy/io/fits/tests/test_table.py::TestTableFunctions::test_copy_vla
3.31s call astropy/utils/tests/test_timer.py::test_timer
3.06s call astropy/io/fits/tests/test_table.py::TestTableFunctions::test_getdata_vla
3.01s call astropy/vo/samp/tests/test_hub_script.py::test_hub_script
2.75s call astropy/io/fits/tests/test_table.py::TestTableFunctions::test_variable_length_columns
2.67s call astropy/io/fits/tests/test_image.py::TestImageFunctions::test_open_scaled_in_update_mode_compressed
```

And for a Linux server I find these 10 tests to be the slowest:
```
41.56s call astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py::test_fk4_no_e_fk5
29.41s call astropy/coordinates/tests/accuracy/test_galactic_fk4.py::test_galactic_fk4
28.80s call astropy/coordinates/tests/accuracy/test_icrs_fk5.py::test_icrs_no_e_fk5
3.31s call astropy/utils/tests/test_timer.py::test_timer
3.03s call astropy/vo/samp/tests/test_hub_script.py::test_hub_script
2.34s call astropy/convolution/tests/test_discretize.py::test_subpixel_gauss_2D
2.18s call astropy/units/tests/test_units.py::test_compose_fractional_powers
2.17s call astropy/units/tests/test_units.py::test_compose_fractional_powers
2.11s call astropy/io/fits/tests/test_image.py::TestImageFunctions::test_open_scaled_in_update_mode_compressed
2.02s call astropy/io/fits/tests/test_image.py::TestImageFunctions::test_open_scaled_in_update_mode
```

I found this documented method to add a [--runslow](http://pytest.org/latest/example/simple.html?highlight=mark%20slow#control-skipping-of-tests-according-to-command-line-option) option for `py.test`.
I'm not familar with the Astropy test runner, but it shouldn't be hard, so I'll try to put it in and add `pytest.mark.slow` to the `astropy/coordinates/tests/accuracy` tests.