Skip to content

Backfill missing unit tests for pinecone.init() method - #168

Merged
jhamon merged 1 commit into
mainfrom
jhamon/add-init-tests
May 3, 2023
Merged

jhamon merged 1 commit into
mainfrom
jhamon/add-init-tests

Conversation

@jhamon

@jhamon jhamon commented Apr 28, 2023 •

Copy link
Copy Markdown
Collaborator

Description

A lot of refactoring is needed in init() method to remove various UX footguns, improve performance (e.g. whoami), and give better error messages when the client is misconfigured. But before we can safely do any of that, we need to add a lot of missing tests to document the existing behavior of the init() method.

Asana Ticket

https://app.asana.com/0/1203260648987893/1204499608161625/f

Type

  • Bug fix
  • New feature
  • Infrastructure change
  • Non-code (docs/comments/lint etc.)
  • Something else: Tech debt / missing tests

@jhamon

jhamon commented Apr 28, 2023

Copy link
Copy Markdown
Collaborator Author

When developing this locally I was just running pytest --maxfail=1 tests/unit to run tests. Looking at this github actions output, I'm not confident tox is actually doing anything inside each of these matrixed test runs. Not familiar with tox, need to dig in more to understand what's going on in there. 🤔

@jhamon
jhamon merged commit 0ad1cf7 into main May 3, 2023
@jhamon
jhamon deleted the jhamon/add-init-tests branch May 3, 2023 05:27
NishchayMahor pushed a commit to NishchayMahor/python-sdk-1 that referenced this pull request Sep 22, 2026
…ops (pinecone-io#168)

* feat(admin): bump admin+oauth to 2026-07 with conformance for all 15 ops

ADMIN_API_VERSION 2025-10 -> 2026-07. A structural diff of the six admin
paths and every component schema shared with 2025-10 (descriptions and
examples ignored) shows zero differences, and oauth_2026-07 differs from
oauth_2025-10 only in info.version — so the sole wire-visible change is
the X-Pinecone-Api-Version value.

Adds conformance tests claiming all 14 carried-over admin operations plus
oauth:get_token, each asserting method+path against the manifest, the
2026-07 header, and a schema round-trip.

Three of those operations answer 202 with no body, which the pinecone-io#89 claim
contract had no honest way to express. The manifest now records
success_body per operation from the OAS, and ClaimRecorder gains
assert_no_response_body; the two schema methods refuse each other's
operations so an operation with a real schema cannot dodge the round-trip.
TokenResponse is now a msgspec model so oauth:get_token has a schema to
round-trip at all.

* docs: add TokenResponse to the admin models reference
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