def test_get_parsed_args_missing_album(self): parser = get_argument_parser() with pytest.raises(SystemExit): _ = get_parsed_args( parser, ['--artist', self.artist], )
def test_get_parsed_args_empty_album(self): parser = get_argument_parser() artist, album, destination = get_parsed_args( parser, [ '--artist', self.artist, '--album', '', ], ) assert album == ''
def test_get_parsed_args_empty_artist(self): parser = get_argument_parser() with pytest.raises(ValueError): _ = get_parsed_args( parser, [ '--artist', '', '--album', self.album, ], )
def test_get_parsed_args_without_destination(self): parser = get_argument_parser() artist, album, destination = get_parsed_args( parser, [ '--artist', self.artist, '--album', self.album, ], ) assert artist == self.artist assert album == self.album assert destination == os.getcwd()
def test_get_argument_parser(self): parser = get_argument_parser() assert isinstance(parser, argparse.ArgumentParser)