You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have an --only-docs mode to be able to test only docs - currently if I work on say astropy.modeling and want to check the docs tests I have to run the full test suite.
@mdboom - I think he wants to be able to do that, but not have it run the actual package tests - only the things in docs. And also be able to do all the docs doctests, but without any of the package tests.
I just think we should have a strong argument for this feature -- our test framework is so flexible at this point it's easy to miss things if not running in particular modes etc. I'd prefer a test framework with as few operating modes as possible.
For me the motivation is that if I develop something in astropy.modeling, I can run and re-run the tests in a matter of seconds, which makes it fast to develop. If I change something in docs, I have to wait for 5 minutes for all the tests to run. Maybe, rather than add options, we could simply make it that:
python setup.py test -t docs/modeling
would work - that is, we aren't adding any additional modes, just making the above work.
I guess I still don't understand: you don't have to run all of the doctests -- you can run only the ones in modeling (along with all of the unit tests in modeling). I think breaking up by package like this is much safer and more natural with respect to likelihood of interdependencies.
I'm not opposed to making -t work for .rst files, though.
@mdboom - just to be clear, how do I run only the tests in the RST files indocs/modeling at the moment? I agree I can run the doctests in astropy/modeling, but not those in docs/modeling.
If you run setup.py test -P modeling, it will run the Python tests, the Python doctests and the .rst doctests in the modeling package only. You don't need to run the entire test suite to run the .rst doctests.
@mdboom - Oh, I didn't know about that! You have proven your point that we already have too many options ;) In that case, I rescind my original suggestion.
Activity
eteq commentedon Feb 5, 2014
By "test only
docs" you mean the doctests, right, @astrofrog? I definitely agree that's a good idea. Sort of the "anti-#2004 "...astrofrog commentedon Feb 5, 2014
@eteq - yeah, the tests in
docs(not the tests in docstrings which should still be tested by the-toption)mdboom commentedon Feb 5, 2014
Not sure I follow:
eteq commentedon Feb 5, 2014
@mdboom - I think he wants to be able to do that, but not have it run the actual package tests - only the things in
docs. And also be able to do all thedocsdoctests, but without any of the package tests.mdboom commentedon Feb 5, 2014
I just think we should have a strong argument for this feature -- our test framework is so flexible at this point it's easy to miss things if not running in particular modes etc. I'd prefer a test framework with as few operating modes as possible.
astrofrog commentedon Feb 5, 2014
For me the motivation is that if I develop something in
astropy.modeling, I can run and re-run the tests in a matter of seconds, which makes it fast to develop. If I change something indocs, I have to wait for 5 minutes for all the tests to run. Maybe, rather than add options, we could simply make it that:would work - that is, we aren't adding any additional modes, just making the above work.
mdboom commentedon Feb 5, 2014
I guess I still don't understand: you don't have to run all of the doctests -- you can run only the ones in modeling (along with all of the unit tests in modeling). I think breaking up by package like this is much safer and more natural with respect to likelihood of interdependencies.
I'm not opposed to making
-twork for.rstfiles, though.astrofrog commentedon Feb 5, 2014
@mdboom - just to be clear, how do I run only the tests in the RST files in
docs/modelingat the moment? I agree I can run the doctests inastropy/modeling, but not those indocs/modeling.mdboom commentedon Feb 5, 2014
If you run
setup.py test -P modeling, it will run the Python tests, the Python doctests and the.rstdoctests in the modeling package only. You don't need to run the entire test suite to run the.rstdoctests.astrofrog commentedon Feb 5, 2014
@mdboom - Oh, I didn't know about that! You have proven your point that we already have too many options ;) In that case, I rescind my original suggestion.
mdboom commentedon Feb 5, 2014
No worries. I still created #2050 so we can address making
-twork for.rstfiles.