Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
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