Did I find the right examples for you? yes no

All Samples(15)  |  Call(14)  |  Derive(0)  |  Import(1)

src/t/a/tambo-0.0.8/tambo/tests/test_parser.py   tambo(Download)
from py.test import raises
from tambo import Parse
import sys
if sys.version < '3':
    from cStringIO import StringIO
    def test_removes_the_first_item_in_the_list_always(self):
        parser = Parse([])
        parser.parse_args()
        assert parser.arguments == []
 
    def test_matches_an_option_in_arguments(self):
        parser = Parse(['/usr/bin/foo', '--foo'])
    def test_matches_arguments_with_no_values(self):
        parser = Parse(['/usr/bin/foo', '--foo'])
        parser.parse_args()
        assert parser._arg_count    == {'--foo' : 0}
        assert parser._count_arg[0] == '--foo'
 
    def test_matches_arguments_with_values(self):
        parser = Parse(['/usr/bin/foo', '--foo', 'BAR'])