cool-easter-32542
07/04/2023, 12:13 PMrun_goal_use_sandbox = false parameter makes it possible to run python files relative to the source directory. This is a huge benefit when using tools like (AWS CDK) that rely on relative paths.
After discussing with @ShantanuKumar in the Slack channel I think two issues exist:
1. The documentation for python_test, python_tests, and python_test_utils seems wrong. In the documentation run_goal_use_sandbox exists as an argument, but tests are no run goals. Looking at the implementation itself it seems like the arguments are never used as well. Hence, all tests run in a sandboxed environment.
2. Since all tests are run in a sandboxed environment, it is not possible to test python_sources reliant on relative paths. In my case AWS CDK.
Pants version
3.16
OS
MacOS
Additional info
https://pantsbuild.slack.com/archives/C046T6T9U/p1688459846180369
pantsbuild/pantscool-easter-32542
07/04/2023, 1:16 PM