Exemplo n.º 1
0
def test_info_setup_complex_pep517_error(mocker, demo_setup_complex):
    mocker.patch(
        "poetry.utils.env.VirtualEnv.run",
        autospec=True,
        side_effect=EnvCommandError(CalledProcessError(1, "mock", output="mock")),
    )

    with pytest.raises(PackageInfoError):
        PackageInfo.from_directory(demo_setup_complex)
def test_search_for_vcs_read_setup_raises_error_if_no_version(provider, mocker):
    mocker.patch(
        "poetry.puzzle.provider.Provider._execute_setup",
        side_effect=EnvCommandError(CalledProcessError(1, "python", output="")),
    )

    dependency = VCSDependency("demo", "git", "https://github.com/demo/no-version.git")

    with pytest.raises(RuntimeError):
        provider.search_for_vcs(dependency)
Exemplo n.º 3
0
 def run(self, bin: str, *args: str) -> None:
     raise EnvCommandError(CalledProcessError(1, "python", output=""))
Exemplo n.º 4
0
 def run(self, bin, *args):
     raise EnvCommandError(CalledProcessError(1, "python", output=""))