Package org.openrewrite.python
Class Assertions
java.lang.Object
org.openrewrite.python.Assertions
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecspipfile(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.toml.tree.Toml.Document>> spec) static org.openrewrite.test.SourceSpecspipfile(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.toml.tree.Toml.Document>> spec) static org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecspyproject(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.toml.tree.Toml.Document>> spec) static org.openrewrite.test.SourceSpecspyproject(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.toml.tree.Toml.Document>> spec) static org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecspython(@Nullable String before, String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.python.tree.Py.CompilationUnit>> spec) static org.openrewrite.test.SourceSpecspython(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.python.tree.Py.CompilationUnit>> spec) static org.openrewrite.test.SourceSpecsrequirementsTxt(@Nullable String before) static org.openrewrite.test.SourceSpecsrequirementsTxt(@Nullable String before, @Nullable String after) static org.openrewrite.test.SourceSpecsrequirementsTxt(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec) static org.openrewrite.test.SourceSpecsrequirementsTxt(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec) static org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecssetupCfg(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec) static org.openrewrite.test.SourceSpecssetupCfg(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec) static org.openrewrite.test.SourceSpecsSets up a Python project with dependencies installed for type attribution.static org.openrewrite.test.SourceSpecsstatic org.openrewrite.test.SourceSpecsuvLock(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.toml.tree.Toml.Document>> spec)
-
Method Details
-
uv
public static org.openrewrite.test.SourceSpecs uv(Path relativeTo, org.openrewrite.test.SourceSpecs... sources) Sets up a Python project with dependencies installed for type attribution. Similar to the JavaScript npm() helper, this creates a cached workspace with dependencies from pyproject.toml and symlinks the virtual environment.- Parameters:
relativeTo- The test directory where files should be writtensources- Source specs including Python files and optionally pyproject.toml- Returns:
- SourceSpecs wrapped in a directory context
-
pyproject
-
pyproject
-
pyproject
-
pyproject
-
uvLock
-
uvLock
-
requirementsTxt
-
requirementsTxt
-
requirementsTxt
-
requirementsTxt
-
setupCfg
-
setupCfg
-
setupCfg
-
setupCfg
-
pipfile
-
pipfile
-
pipfile
-
pipfile
-
python
-
python
-
python
-
python
-