Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix strange tests #55

Merged
merged 1 commit into from

2 participants

@prijutme4ty

I found strange test. It looks that assert_fail syntax used improperly (though I think it work). Please review my patch. If it's right, I'll fix this in ruby tests too

@keleshev
Owner

Now I understand what you mean by "strange tests"—I agree those assert's are redundant.

@keleshev keleshev merged commit fce1ee7 into docopt:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 24, 2012
  1. @prijutme4ty

    fix strange tests

    prijutme4ty authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 test_docopt.py
View
6 test_docopt.py
@@ -68,7 +68,7 @@ def test_commands():
assert docopt('Usage: prog (add|rm)', 'rm') == {'add': False, 'rm': True}
assert docopt('Usage: prog a b', 'a b') == {'a': True, 'b': True}
with raises(DocoptExit):
- assert docopt('Usage: prog a b', 'b a')
+ docopt('Usage: prog a b', 'b a')
def test_parse_doc_options():
@@ -526,7 +526,7 @@ def test_count_multiple_flags():
assert docopt('usage: prog [-vv]', '-v') == {'-v': 1}
assert docopt('usage: prog [-vv]', '-vv') == {'-v': 2}
with raises(DocoptExit):
- assert docopt('usage: prog [-vv]', '-vvv')
+ docopt('usage: prog [-vv]', '-vvv')
assert docopt('usage: prog [-v | -vv | -vvv]', '-vvv') == {'-v': 3}
assert docopt('usage: prog -v...', '-vvvvvv') == {'-v': 6}
assert docopt('usage: prog [--ver --ver]', '--ver --ver') == {'--ver': 2}
@@ -538,7 +538,7 @@ def test_count_multiple_commands():
assert docopt('usage: prog [go go]', 'go') == {'go': 1}
assert docopt('usage: prog [go go]', 'go go') == {'go': 2}
with raises(DocoptExit):
- assert docopt('usage: prog [go go]', 'go go go')
+ docopt('usage: prog [go go]', 'go go go')
assert docopt('usage: prog go...', 'go go go go go') == {'go': 5}
Something went wrong with that request. Please try again.