-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version is not reported on CLI #424
Comments
Odd. I can replicate this bug. Maybe something is shadowing it from when we changed the replay and indexing sub-argparsing. |
This time a test would be easy to write for this one I guess. |
Good call but the version number will change and it's probably best that we don't have to maintain the test based on the version. Should we check for a string like "InterPlanetary Wayback v." in the output? Regex? Let's use this ticket for a test-driven resolution with it failing once we create the test then resolved with the eventual PR. |
In def checkArgs(argsIn):
argCount = len(argsIn)
cmdList = ['index', 'replay']
...
cmdError_invalidCommand = argCount > 1 and argsIn[1] not in cmdList
if cmdError_noCommand or cmdError_invalidCommand:
parser.print_help() With |
The point is, you don't make your test too rigid, but not too loose either. Just test what you expect to be there, be it a pattern, a prefix, or something else. |
Consider version and daemon flag on base argparser. Closes #424
Neither
-v
not--version
flags seem to be working.The text was updated successfully, but these errors were encountered: