MCPcopy Create free account
hub / github.com/apache/arrow / test_compose_error

Function test_compose_error

dev/archery/archery/docker/tests/test_docker.py:529–543  ·  view source on GitHub ↗
(arrow_compose_path)

Source from the content-addressed store, hash-verified

527
528
529def test_compose_error(arrow_compose_path):
530 compose = DockerCompose(arrow_compose_path, params=dict(
531 PYTHON='3.8',
532 PANDAS='upstream_devel'
533 ))
534
535 error = subprocess.CalledProcessError(99, [])
536 with mock.patch('subprocess.run', side_effect=error):
537 with pytest.raises(RuntimeError) as exc:
538 compose.run('conda-cpp')
539
540 exception_message = str(exc.value)
541 assert "exited with a non-zero exit code 99" in exception_message
542 assert "PANDAS: latest" in exception_message
543 assert "export PANDAS=upstream_devel" in exception_message
544
545
546def test_image_with_gpu(arrow_compose_path):

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
DockerComposeClass · 0.90

Tested by

no test coverage detected