Test a Python worker
Test pure Python behavior with the project’s normal test runner, then attach the actual worker through DuckDB or Haybarn. The shared testing guide covers the verification manifest and SQL assertions.
Launch the project you tested
Section titled “Launch the project you tested”Use the same pinned environment in development and integration tests. For a PEP 723 script, the verification manifest’s worker command is:
"worker": ["uv", "run", "worker.py"]
For a package, use its real console entrypoint or module. Keep diagnostic logging on stderr: stdout carries the Arrow protocol.
Test the Arrow contract
Section titled “Test the Arrow contract”Verify representative values, null propagation, empty input, output types, and multiple batches.
If your worker wraps a library, test that library’s edge cases as well. A direct vgi.client.Client
test is useful for transport diagnostics; the SQL test also verifies registration and binding.
Use signatures from the installed release. For example, current SDK releases use
Schema(path=["main"]) and client schema_path=["main"]; earlier releases used different names.
The portable Python fixture pins its SDK and includes executable SQL assertions. To let a coding agent create or repair the worker and tests, start with Build with an Agent.