millions-tailor-16868
09/20/2024, 7:21 PMpytest run outputs differ between a Docker environment and local environment?
Namely, in Docker the test summary is very terse and it prints a coverage report, whereas in Local it prints PASS/FAIL per unit test and it does not print a coverage report.
I find this very odd, I'm installing pytest from a resolve file so the version should be pinned on both environments.happy-kitchen-89482
09/20/2024, 8:29 PM.pants.rc or ~/.pants.rc or /etc/pantsrc in one but not the other?millions-tailor-16868
09/23/2024, 7:22 AMpants.toml
[environments-preview.names]
#pytest_env = "//src/tests:python3_docker"
pytest_env = "//src/tests:local_os"
And my contents of the src/tests/BUILD are:
python_tests(
name="unittests",
environment="pytest_env",
)
local_environment(
name="local_os"
)
docker_environment(
name="python3_docker",
platform="linux_x86_64",
image="<http://docker.io/library/python:3.12-slim|docker.io/library/python:3.12-slim>"
)millions-tailor-16868
09/23/2024, 7:23 AM