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