Skip to content

Commit

Permalink
Improve documentation for python_test_utils (Cherry-pick of #14739) (
Browse files Browse the repository at this point in the history
…#14748)

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano authored Mar 9, 2022
1 parent 9a78c15 commit d9cf5c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/python/pants/backend/python/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)


Expand Down

0 comments on commit d9cf5c3

Please sign in to comment.