From d9cf5c394c06ba52735f3cbbd454e05fd75c4213 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Wed, 9 Mar 2022 11:52:26 -0700 Subject: [PATCH] Improve documentation for `python_test_utils` (Cherry-pick of #14739) (#14748) [ci skip-rust] [ci skip-build-wheels] --- src/python/pants/backend/python/target_types.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/python/pants/backend/python/target_types.py b/src/python/pants/backend/python/target_types.py index 1787f047f50..ae7638d397f 100644 --- a/src/python/pants/backend/python/target_types.py +++ b/src/python/pants/backend/python/target_types.py @@ -790,10 +790,12 @@ class PythonTestUtilsGeneratorTarget(Target): ) help = ( "Generate a `python_source` target for each file in the `sources` field.\n\n" - "This target generator is intended for test utility files like `conftest.py`, although it " - "behaves identically to the `python_sources` target generator and you can safely use that " - "instead. This target only exists to help you better model and keep separate test support " - "files vs. production files." + "This target generator is intended for test utility files like `conftest.py` or " + "`my_test_utils.py`. Technically, it generates `python_source` targets in the exact same " + "way as the `python_sources` target generator does, only that the `sources` field has a " + "different default. So it is valid to use `python_sources` instead. However, this target " + "can be helpful to better model your code by keeping separate test support files vs. " + "production files." )