Skip to content

Commit

Permalink
a little more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Oct 16, 2024
1 parent 8cd1e78 commit db437fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dp_creator_ii/argparse_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ def _get_arg_parser():
return parser


def _get_args(): # pragma: no cover
def _get_args():
"""
>>> _get_args()
Namespace(csv_path=None, contributions=1, demo=False)
"""
arg_parser = _get_arg_parser()
if "--port" in argv or "-v" in argv or "-k" in argv:
# We are running a test,
# and ARGV is polluted, so override:
return arg_parser.parse_args([])
else:
# Normal parsing:
return arg_parser.parse_args()
return arg_parser.parse_args() # pragma: no cover


def _clip(n, lower, upper):
Expand Down

0 comments on commit db437fe

Please sign in to comment.