コード例 #1
0
ファイル: test_cli.py プロジェクト: Neurocinetics/rpmvenv
def test_python_cmd_build(python_source_code, python_config_file):
    """Test that a default build works without exception."""
    with pytest.raises(SystemExit) as exc_info:
        cli.main((python_config_file, '--source', python_source_code))
    rc = exc_info.value.code if type(exc_info.value) == SystemExit else \
        exc_info.value
    assert rc == 0
コード例 #2
0
ファイル: test_cli.py プロジェクト: oleynikandrey/rpmvenv
def test_python_cmd_build(
    request,
    python_source_code,
    python_config_file,
    tmpdir,
):
    """Test that a default build works without exception."""
    if not request.config.getvalue("python_git_url"):
        pytest.skip("No --python-git-url option was given")

    with pytest.raises(SystemExit) as exc_info:
        cli.main(
            (
                python_config_file,
                '--source', python_source_code,
                '--destination', str(tmpdir),
            )
        )
    rc = exc_info.value.code if type(exc_info.value) == SystemExit else \
        exc_info.value
    assert rc == 0
コード例 #3
0
def test_python_cmd_build(python_source_code, python_config_file):
    """Test that a default build works without exception."""
    cli.main((python_config_file, '--source', python_source_code))
コード例 #4
0
ファイル: test_cli.py プロジェクト: chrisknight32/rpmvenv
def test_python_cmd_build(python_source_code, python_config_file):
    """Test that a default build works without exception."""
    with pytest.raises(SystemExit) as exc_info:
        cli.main((python_config_file, "--source", python_source_code))
    rc = exc_info.value.code if type(exc_info.value) == SystemExit else exc_info.value
    assert rc == 0