diff --git a/tests/python/pants_test/pants_run_integration_test.py b/tests/python/pants_test/pants_run_integration_test.py index de8b85a6c7f..b7be5e878c1 100644 --- a/tests/python/pants_test/pants_run_integration_test.py +++ b/tests/python/pants_test/pants_run_integration_test.py @@ -183,10 +183,6 @@ def hermetic_env_whitelist(cls): # Ensure that the underlying ./pants invocation doesn't run from sources # (and therefore bootstrap) if we don't want it to. 'RUN_PANTS_FROM_PEX', - # This tells the ./pants runner script to avoid trying to clean the workspace when changing - # python versions. CI starts off without the .python-interpreter-constraints file, so it - # would otherwise run a clean-all without this env var. - 'ONLY_USING_SINGLE_PYTHON_VERSION', ] def setUp(self): @@ -326,6 +322,11 @@ def run_pants_with_workdir_without_waiting(self, command, workdir, config=None, if extra_env: env.update(extra_env) + # This tells the ./pants runner script to avoid trying to clean the workspace when changing + # python versions. Since integration tests are run in a new buildroot, we don't need to do the + # clean-all. + env['ONLY_USING_SINGLE_PYTHON_VERSION'] = 'true' + # Don't overwrite the profile of this process in the called process. # Instead, write the profile into a sibling file. if env.get('PANTS_PROFILE'):