Skip to content

Expand Python SDK test coverage  #3317

@slbotbm

Description

@slbotbm

Description

Today, the python test suite covers basic happy paths for connectivity, stream/topic creation, polling, TLS, and a few error cases, but it does not exercise the Python binding layer broadly or systematically. There is also no property-based testing, and thus invariants around payload conversion, polling strategy construction, auto-commit configuration, and connection-string parsing are not being stress-tested across a wide input space.

We should strengthen the Python SDK test suite so it can catch binding regressions, input-handling bugs, and edge cases earlier.

Component

Python SDK

Proposed solution

  1. Add property-based testing support to foreign/python test dependencies.
    • Add hypothesis to the testing extras in foreign/python/pyproject.toml.
  2. Add broader tests for Python-exposed API behavior.
    • Cover valid and invalid inputs, boundary values, Unicode payloads, binary payloads, empty payloads, large payloads, and malformed connection strings.
  3. Add property-based tests for binding invariants.
  4. Expand the existing suite instead of only adding more happy-path tests.

This work will be done in multiple PR's instead of a single one since the change is large.

Alternatives considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerspythonPull requests that update Python codetestNew testcase, or improvement of existing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions