INNER CODE UNIT · Python

test_package_with_pip_args

logandk/serverless-wsgi · requirements_test.py:219

def test_package_with_pip_args(mock_system, mock_virtualenv):
    requirements.package(
        ["/path1/requirements.txt"],
        "/tmp",
        "--no-deps --imaginary-arg 'imaginary \"value\"'",
    )

    # Invokes pip for package installation
    assert mock_system[15] == (
        "subprocess.Popen",
        (
            [
                "/tmp/.venv/bin/pip",
                "install",
                "-r",
                "/path1/requirements.txt",
                "--no-deps",
                "--imaginary-arg",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…