astropy / astropy-helpers

Helpers for Astropy and Affiliated packages
BSD 3-Clause "New" or "Revised" License
28 stars 42 forks source link

astropy-helpers's default is to use astropy's pytest #36

Closed wkerzendorf closed 10 years ago

wkerzendorf commented 10 years ago

Is it possible to make the system py.test the default (looking in the code, that seems to already be the way, but it doesn't seem to work).

astrofrog commented 10 years ago

The default should be and is to use astropy's py.test to ensure version compatibility. See http://astropy.readthedocs.org/en/latest/development/testguide.html#setup-py-test for how to use the system one.

wkerzendorf commented 10 years ago

I understand that ASTROPY-USE-SYSTEM-PYTEST=1 is the current way to disable the default behaviour of using astropy. However, I think it would be great to be able to set this default maybe in the setup.cfg. I think of astropy-helpers also as a software carpentry package that helps other astronomers setup their own packages with sensible frameworks for tests/documentation built-in and they might not want to rely on the astropy pytest. If there is no immediate objections to this, I can have a quick look and maybe make a PR.

embray commented 10 years ago

All astropy-helpers itself provides is a bare-bones setup.py test command that invokes astropy.test() (or some_affiliated_package.test()) which, itself, uses Astropy's pytest-based test-runner if one is using the package-template. astropy-helpers itself otherwise provides no test facilities. The solution to using a completely different test runner would be to install a different test command in the setup.py.

wkerzendorf commented 10 years ago

@embray - Thanks for your suggestion. Is there a website on how to use package-template? It might be useful to add this there. The link for using py.test is here: http://pytest.org/latest/goodpractises.html