rules/python/test.js
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
pythonTest
const pythonTest
Declare a pytest test suite over a Python project directory. inside the test sandbox: nativeTool() specifications or legacy target providers whose kind registers a TOOL product.
| Parameter | Type | Description |
|---|---|---|
| opts | object | |
| [opts.src="."] | string | Workspace-relative Python project directory. |
| [opts.testArgs=[]] | string[] | Extra arguments appended to pytest. |
| [opts.uvVersion] | object | string |
| [opts.resolve] | object | Locked Python resolve supplying the project path; exclusive with src. |
| [opts.deps=[]] | Array | Extra tool providers made available on PATH |
Returns: object Label handle.