Skip to content

Fill in tests - #73

Merged
davebelais merged 9 commits into
mainfrom
test-coverage
Aug 3, 2026
Merged

Fill in tests#73
davebelais merged 9 commits into
mainfrom
test-coverage

Conversation

@davebelais

@davebelais davebelais commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a new skill for toggling "Fable Plan Mode" locally in the repository, adds project documentation for the oapi agent, and enables a Claude plugin in the local settings. The changes are focused on improving local development workflows and providing detailed documentation for contributors.

Fable Plan Mode skill:

  • Added fableplan skill documentation in .claude/skills/fableplan/SKILL.md, describing how to toggle Fable 5 plan mode locally, its arguments, backup/restore behavior, and important caveats. This allows users to enable or disable Fable 5 planning for their own machine without affecting others or committing changes.

Project documentation:

  • Added AGENTS.md with a comprehensive overview of the oapi agent: describes its purpose (generating type-safe Python API clients from OpenAPI specs), file structure, development environment, commands, CI, and conventions for contributors.

Local configuration:

  • Enabled the superpowers@claude-plugins-official plugin by updating .claude/settings.json.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a large set of new tests, fixtures, and supporting infrastructure to close coverage gaps across oapi (client runtime/codegen, model/codegen helpers, OAS hooks and reference resolution), along with optional dependency updates for additional content encodings and some internal documentation/config files.

Changes:

  • Introduces a stdlib-only local HTTP test server and many new integration-style tests for Client and generated client modules.
  • Adds focused OpenAPI fixture documents to exercise multipart, parameter styles, polymorphic schemas, and security schemes.
  • Updates optional dependencies/extras (zstd + brotli) and adds initiative/spec documentation.

Reviewed changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/test_utilities.py Unit tests for _utilities helpers + deprecated aliases.
tests/test_servers.py Tests for the new local HTTP test server behavior.
tests/test_references.py Tests for $ref resolver/document behaviors (incl. HTTP fetch).
tests/test_oas_model_hooks.py Tests for OAS model validation/unmarshal hooks.
tests/test_multipart_request.py Tests for multipart encoding types and real HTTP sending.
tests/test_model_module_polymorphic_schemas.py Black-box tests validating generated model behavior for allOf/oneOf/anyOf/etc.
tests/test_model_module_helpers.py Direct unit tests for helper functions in oapi.model.
tests/test_model_module_empty_schema.py Test documenting a currently broken ModelModule output edge case.
tests/test_input_data.py Validates newly added input-data fixtures parse/validate as OpenAPI.
tests/test_conftest.py Sanity test for generated-module loader fixture.
tests/test_client_retry_and_encoding.py Tests retry/backoff + content encoding round-trips.
tests/test_client_request_runtime.py Integration tests for Client.request() behavior against local server.
tests/test_client_request_assembly.py Tests request assembly, curl rendering, and parameter formatting helpers.
tests/test_client_pickling.py Tests pickling helpers and SSLContext behaviors.
tests/test_client_oauth2_flows.py Integration tests for OAuth2 flows against local server.
tests/test_client_module_security_schemes.py End-to-end codegen/runtime tests for security schemes.
tests/test_client_module_polymorphic_responses.py End-to-end codegen/runtime tests for polymorphic response typing.
tests/test_client_module_parameter_styles.py End-to-end codegen/runtime tests for OpenAPI parameter styles.
tests/test_client_module_multipart.py End-to-end codegen/runtime test for multipart request codegen.
tests/test_client_module_helpers.py Unit tests for ClientModule helper utilities.
tests/test_client_init_and_pickling.py Unit tests for Client init validation and pickle state behavior.
tests/test_client_authentication.py Unit tests for auth header/query/cookie behavior.
tests/test_client_argument_formatting.py Unit tests for argument formatting and urlencode behavior.
tests/servers.py New stdlib-only HTTP server used by integration tests.
tests/input-data/security-schemes.json New OpenAPI fixture for auth/security-scheme coverage.
tests/input-data/polymorphic-schemas.json New OpenAPI fixture for schema merge/polymorphism coverage.
tests/input-data/parameter-styles.json New OpenAPI fixture covering serialization styles.
tests/input-data/multipart-request-body.json New OpenAPI fixture for multipart form-data request bodies.
tests/conftest.py Shared fixtures for generating/importing generated modules/packages.
pyproject.toml Adds optional deps/extras for zstandard and brotli (and includes them in test env).
docs/superpowers/specs/2026-08-01-test-coverage-design.md Coverage initiative design/spec documentation.
docs/superpowers/plans/2026-08-02-model-module-gap-tests.md Plan documentation for model-module gap tests.
AGENTS.md Repo contribution/environment conventions and commands.
.gitignore Adjusts .claude ignore/unignore rules and ignores local settings file.
.claude/skills/fableplan/SKILL.md Adds a local skill document for toggling “Fable Plan Mode”.
.claude/settings.json Enables the “superpowers” Claude plugin for this repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_client_retry_and_encoding.py Outdated
Comment thread tests/test_client_pickling.py Outdated
Comment thread tests/test_model_module_empty_schema.py Outdated
Comment thread tests/test_client_request_runtime.py Outdated
Comment thread tests/test_client_module_parameter_styles.py Outdated
Comment thread tests/test_client_module_security_schemes.py Outdated
Comment thread tests/test_client_oauth2_flows.py Outdated
@davebelais
davebelais requested a review from Copilot August 3, 2026 20:43
@davebelais
davebelais marked this pull request as ready for review August 3, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 36 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

src/oapi/client.py:2744

  • filter(None, sob.utilities.iter_properties_values(...)) does not actually filter out unset OAuth flows when the iterator yields (name, None) pairs (non-empty tuples are truthy). That can cause _get_oauth2_flow_names() to include flow names that aren’t present in the spec, since it collects item[0] from _iter_oauth2_flows() without checking flow. Filter explicitly on flow is not None instead.
                    for flow_name, flow in filter(
                        None,
                        sob.utilities.iter_properties_values(
                            security_scheme.flows
                        ),
                    ):

Comment thread tests/conftest.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 37 changed files in this pull request and generated no new comments.

@davebelais
davebelais merged commit d4be0e1 into main Aug 3, 2026
13 checks passed
@davebelais
davebelais deleted the test-coverage branch August 3, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants