astropy/astropy — pull request #27 by jiffyclub (2011-10-20 21:40:39+00:00)
Title: Big Data Marker

This pull request implements a scheme for handling tests which should not be run by default. `astropy.tests.helper` defines a marker called `big_data` which should be used to mark any test which uses online data. `astropy.test()` will skip any test marked with `@big_data` unless the `big_data` keyword is set to True. (This adds the `--runbigdata` flag to `args` in `helper.run_tests`.)

If tests are run by using `py.test` at the command line in a ``tests`` folder then the decorators will be ignored because `py.test` will not see the hooks defined in `helper.py`. I don't think this should be a problem, though.

In the future we can use the same setup for marking tests as slow, or otherwise non-default.

In a tangential change, I changed the `pastebin` option to `run_tests` so that it only accepts `'failed'` and `'all'` as acceptable values (in addition to the default `None`). Before you could specify `pastebin=True` which was the same as `pastebin='failed'` and I didn't like having two options do the same thing. I modified the docstring to make things clear.