def test_parser(self): """Test _parser with no arguments.""" namespace = argparse.Namespace(repo=None, summarize=False, tag=None, user=None) assert gdc._parser(None) == namespace and gdc._parser([]) == namespace
def test_parser_summarize(self): """Test _parser with -s/--summarize.""" namespace = argparse.Namespace( repo=None, summarize=True, tag=None, user=None) for flag in ('-s', '--summarize'): assert gdc._parser([flag]) == namespace
def test_parser_with_tag(self): """Test _parser with tag.""" namespace = argparse.Namespace(repo='nowhere', summarize=False, tag='nothing', user='******') assert gdc._parser(['nobody', 'nowhere', 'nothing']) == namespace
def test_parser_with_repo(self): """Test _parser with repo.""" namespace = argparse.Namespace(repo='nowhere', summarize=False, tag=None, user='******') assert gdc._parser(['nobody', 'nowhere']) == namespace
def test_parser_with_user(self): """Test _parser with USER.""" namespace = argparse.Namespace(repo=None, summarize=False, tag=None, user='******') assert gdc._parser(['nobody']) == namespace
def test_parser_summarize(self): """Test _parser with -s/--summarize.""" namespace = argparse.Namespace(repo=None, summarize=True, tag=None, user=None) for flag in ('-s', '--summarize'): assert gdc._parser([flag]) == namespace
def test_parser_with_tag(self): """Test _parser with tag.""" namespace = argparse.Namespace( repo='nowhere', summarize=False, tag='nothing', user='******') assert gdc._parser(['nobody', 'nowhere', 'nothing']) == namespace
def test_parser_with_repo(self): """Test _parser with repo.""" namespace = argparse.Namespace( repo='nowhere', summarize=False, tag=None, user='******') assert gdc._parser(['nobody', 'nowhere']) == namespace
def test_parser_with_user(self): """Test _parser with USER.""" namespace = argparse.Namespace( repo=None, summarize=False, tag=None, user='******') assert gdc._parser(['nobody']) == namespace
def test_parser(self): """Test _parser with no arguments.""" namespace = argparse.Namespace( repo=None, summarize=False, tag=None, user=None) assert gdc._parser(None) == namespace and gdc._parser([]) == namespace