skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

HACKING instructions for running tests fail on master #82

Closed alexamici closed 7 years ago

alexamici commented 8 years ago

I wanted to make a PR for #81, but running py.test as per HACKING fails on current master with:

$ py.test skyfield/tests/test_timelib.py
========= test session starts ============================
platform darwin -- Python 3.5.0, pytest-2.9.0, py-1.4.31, pluggy-0.3.1
[...]
collected 22 items 

skyfield/tests/test_timelib.py EEEEEEEEEEEEEEEEEEEEEE

==================== ERRORS =======================
_____ ERROR at setup of test_JulianDate_init ________________
file /Users/amici/devel/python-skyfield/skyfield/tests/test_timelib.py, line 17
  def test_JulianDate_init(time_parameter, time_value):
        fixture 'time_parameter' not found
        available fixtures: capfd, cache, monkeypatch, spawnu, recwarn, tmpdir_factory, pytestconfig, tmpdir, capsys, record_xml_property
        use 'py.test --fixtures [testpath]' for help on them.

/Users/amici/devel/python-skyfield/skyfield/tests/test_timelib.py:17
[...]

Tests don't look right for use with py.test, all fixtures miss the @pytest.fixture decorator, I'd like to help, but I'm pretty confused.

brandon-rhodes commented 8 years ago

And, more generally, there seem to be two files that deal with contributing — HACKING.rst, and Contrib.rst. I will try to eliminate the duplication soon and get the instructions cleaned up!