Repository navigation
Conversation
|
The companion to update the test command is astropy/astropy-helpers#72 |
There was a problem hiding this comment.
Surely we could come up with a better name as well as doc for this. As long as we're defining our own interface why call it "k-anything"? I had to look up what py.test -k means.
There was a problem hiding this comment.
I was thinking the explicit reference to k is good because that's what py.test calls it, so if you want to look up the syntax (which can be pretty convoluted if you want it to be), you need to know what to look up in the py.test docs. So I was trying to be minimal to redirect interested parties to the docs for -k instead of putting much detail here.
But none of that is a strong opinion - as long as the help clearly says something like "look up more details by looking up the py.test -k option", then I agree the name can be pretty much anything. Do you have a suggestion in mind, @embray? Maybe -s and --select-test or something like that?
There was a problem hiding this comment.
I would actually vote for sticking with the py.test options otherwise it's going to get confusing. -s is already used for something else in pytest (show stdout) and if we decided to make that available at the top level, we could no longer use -s. We've been consistent so far, so I don't see a reason to change.
There was a problem hiding this comment.
-k is fine for the short name. In principle we don't even need a long name, but if we had one I'd just say --test-name or something like that. The point is that it matches the test name against a pattern.
|
@astrofrog - just so we're clear, are you saying in the last comment that you think this shouldn't be done at all? That is, we should just leave the interface as-is? Part of my motivations is the comment "I had to look up what py.test -k means." - I think that's a little-known feature of py.test, but it's immensely useful as we get more-and-more tests. But I'm not strongly attached to this, so if you are quite against it, then we can just close this (and astropy/astropy-helpers#72 ) |
|
I'd be fine with adding support for |
|
@eteq - sorry for dropping the ball on this. I think we should implement this but I'm suggesting we keep the naming consistent with py.test so I'm +1 on |
|
Hmm, good point, @astrofrog. Maybe some other opinions? @mdboom @mhvk @keflavich (people I have vague memories of maybe seeing |
|
Note (mostly to myself unless someone else decided to do this) that this probably needs a major overhaul following #4020 . |
|
Just a bit of shuffling around really. I can even do it if you want. |
|
I'm just going to close this as it would be better to start afresh at this point anyway, whether or not this is worth doing. |
I got tired of constantly doing
python setup.py test --args="-k <something>"to select particular tests by name, so this adds a command to the astropy test runner that does this directly (without needing to go throughargs)