Skip to content
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

Ability to test for missing args #203

Open
vladimirvivien opened this issue Feb 23, 2021 · 2 comments
Open

Ability to test for missing args #203

vladimirvivien opened this issue Feb 23, 2021 · 2 comments

Comments

@vladimirvivien
Copy link
Contributor

Currently, an executing script will fail if an attempt is made to access a missing or undefined args. For instance, the following will fail:

def test_args:
    if args.myArg == "":

If myArg was not provided as script argument (--args or --args-file) the previous will fail.

As a script author, missing arguments should fail silently by returning empty string. Or provide a way to test their declaration.

@vladimirvivien
Copy link
Contributor Author

@nrb Let me know if this summarize what you need. Thanks.

@nrb
Copy link

nrb commented Feb 24, 2021

Yep, that sounds like what I'm looking for!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants