def test_parser_show(args, exp): # use dict instead of argparse.Namespace for pretty pytest diff exp_ns = {'action': exp[0], 'session': exp[1], 'slices': exp[2], 'numerate': exp[3], 'reverse': exp[4], 'start_time': None, 'end_time': None, 'datetime_format': None, 'timestamp': False} ns = _xh_parse_args(shlex.split(args)) assert ns.__dict__ == exp_ns
def test_parser_show(args, exp): # use dict instead of argparse.Namespace for pretty pytest diff exp_ns = {'action': exp[0], 'session': exp[1], 'slices': exp[2], 'numerate': exp[3], 'reverse': exp[4], 'start_time': None, 'end_time': None, 'datetime_format': None, 'timestamp': False} ns = _xh_parse_args(shlex.split(args)) assert ns.__dict__ == exp_ns
def test_parser_show(args, exp): # use dict instead of argparse.Namespace for pretty pytest diff exp_ns = { "action": exp[0], "session": exp[1], "slices": exp[2], "numerate": exp[3], "reverse": exp[4], "start_time": None, "end_time": None, "datetime_format": None, "timestamp": False, "null_byte": False, } ns = _xh_parse_args(shlex.split(args)) assert ns.__dict__ == exp_ns
def test_parser_show(args, exp): # use dict instead of argparse.Namespace for pretty pytest diff exp_ns = { "action": exp[0], "session": exp[1], "slices": exp[2], "numerate": exp[3], "reverse": exp[4], "start_time": None, "end_time": None, "datetime_format": None, "timestamp": False, "null_byte": False, } ns = _xh_parse_args(shlex.split(args)) assert ns.__dict__ == exp_ns
def test_parse_args_help(args, capsys): with pytest.raises(SystemExit): args = _xh_parse_args(shlex.split(args)) assert "show this help message and exit" in capsys.readouterr()[0]
def test_parse_args_help(args, capsys): with pytest.raises(SystemExit): args = _xh_parse_args(shlex.split(args)) assert 'show this help message and exit' in capsys.readouterr()[0]