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.

ParameterTypeDescription
optsobject
[opts.src="."]stringWorkspace-relative Python project directory.
[opts.testArgs=[]]string[]Extra arguments appended to pytest.
[opts.uvVersion]objectstring
[opts.resolve]objectLocked Python resolve supplying the project path; exclusive with src.
[opts.deps=[]]ArrayExtra tool providers made available on PATH

Returns: object Label handle.