def _test_parse_arguments_help(capsys, help): with pytest.raises(SystemExit) as ex: mount_efs.parse_arguments_early_exit(["mount", "foo", "bar", help]) assert 0 == ex.value.code out, err = capsys.readouterr() assert "Usage:" in out
def _test_parse_arguments_help(capsys, help): with pytest.raises(SystemExit) as ex: mount_efs.parse_arguments_early_exit(['mount', 'foo', 'bar', help]) assert 0 == ex.value.code out, err = capsys.readouterr() assert 'Usage:' in out
def test_parse_arguments_version(capsys): with pytest.raises(SystemExit) as ex: mount_efs.parse_arguments_early_exit( ["mount", "foo", "bar", "--version"]) assert 0 == ex.value.code out, err = capsys.readouterr() assert "Version: %s" % mount_efs.VERSION in out
def test_parse_arguments_version(capsys): with pytest.raises(SystemExit) as ex: mount_efs.parse_arguments_early_exit( ['mount', 'foo', 'bar', '--version']) assert 0 == ex.value.code out, err = capsys.readouterr() assert 'Version: %s' % mount_efs.VERSION in out