Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainDe committed Apr 8, 2015
1 parent f24bd17 commit 4e57195
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions didyoumean/didyoumean_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,14 @@ def test_nb_args(self):
self.throws(bad_code, NBARGERROR)
self.runs(good_code)

def test_nb_args1(self):
"""Should have 0 args."""
typo, sugg = '1', ''
code = func_gen(param='', args='{0}')
bad_code, good_code = format_str(code, typo, sugg)
self.throws(bad_code, UNKNOWN_TYPEERROR) # FIXME
self.runs(good_code)

def test_nb_args2(self):
"""Should have 1 arg."""
typo, sugg = '', '1'
Expand Down

0 comments on commit 4e57195

Please sign in to comment.