feat: support passenv (#914)
* feat: support passenv * refactor: environment-pass and spaces * docs: document environment pass * Add unit test for passing through awkward env variable values * Remove unused as_shell_commands method from environment * Fix passthrough edge case by avoiding bash for passthrough assignments * Fix mypy error in test * Fix unit test * Apply suggestions from code review Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
parent
1176024473
commit
f45de3f24e
@@ -8,7 +8,7 @@ from pathlib import Path, PurePath
|
||||
import pytest
|
||||
|
||||
from cibuildwheel.docker_container import DockerContainer
|
||||
from cibuildwheel.environment import EnvironmentAssignment
|
||||
from cibuildwheel.environment import EnvironmentAssignmentBash
|
||||
|
||||
# for these tests we use manylinux2014 images, because they're available on
|
||||
# multi architectures and include python3.8
|
||||
@@ -198,5 +198,5 @@ def test_dir_operations(tmp_path: Path):
|
||||
@pytest.mark.docker
|
||||
def test_environment_executor():
|
||||
with DockerContainer(docker_image=DEFAULT_IMAGE) as container:
|
||||
assignment = EnvironmentAssignment("TEST=$(echo 42)")
|
||||
assignment = EnvironmentAssignmentBash("TEST=$(echo 42)")
|
||||
assert assignment.evaluated_value({}, container.environment_executor) == "42"
|
||||
|
||||
Reference in New Issue
Block a user