Skip to content

Commit

Permalink
add missing checks
Browse files Browse the repository at this point in the history
add checks for non numeric arg and too many args
  • Loading branch information
curiouskiwi authored Sep 13, 2021
1 parent 2c1bfe2 commit 935129d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions caesar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ def checks_for_handling_non_alpha():
def handles_no_argv():
"""handles lack of argv[1]"""
check50.run("./caesar").exit(1)

@check50.check(compiles)
def handles_non_numeric_argv():
"""handles non-numeric key"""
check50.run("./caesar 2x").exit(1)

@check50.check(compiles)
def too_many_args():
"""handles too many arguments"""
check50.run("./caesar 1 2").exit(1)

0 comments on commit 935129d

Please sign in to comment.