Repository navigation
refactor: move the shopping tests and fixtures into shopping/ (file moves only) (RFC #520, 2/3) - #121
Merged
damaz91 merged 3 commits intoNov 10, 2026
Conversation
segiodongo
force-pushed
the
split/2-move-shopping-tests
branch
from
November 2, 2026 18:02
16ac45e to
9356650
Compare
segiodongo
force-pushed
the
split/2-move-shopping-tests
branch
from
November 3, 2026 22:30
78f413a to
9760423
Compare
5 of 17 tasks
segiodongo
force-pushed
the
split/2-move-shopping-tests
branch
from
November 5, 2026 20:05
9760423 to
1a5e21c
Compare
segiodongo
marked this pull request as ready for review
November 5, 2026 20:05
carolinerg1
approved these changes
Nov 5, 2026
8 of 9 tasks
…oves only) Second step of the RFC #520 split of Universal-Commerce-Protocol#107. Every test module moves to the package that owns it, with no content changes, so git tracks each file as a 100% rename and open pull requests rebase onto the new paths: - checkout, discount, fulfillment, order and validation tests go under `shopping/<domain>/`; `test_data/flower_shop` becomes `shopping/fixtures/flower_shop` (a symlink keeps the old path working). - the payment credential tests (`ap2_test`, `card_credential_test`, `binding_test` as `token_binding_test`) go under `common/payments/`. The tests still import `integration_test_utils`; the runner registry, CI and README follow the files.
`integration_test_utils.py` becomes `shopping/base.py` (git shows it as a 94% copy because a facade keeps the old path). The facade re-exports every name tests import from `integration_test_utils`, so the moved tests and any open pull request keep working unchanged; it is not yet marked deprecated because the in-tree tests still use it. The shopping fixtures default to `shopping/fixtures/flower_shop`, and the wheel lists the `common` and `shopping` packages instead of the former top-level test modules.
segiodongo
force-pushed
the
split/2-move-shopping-tests
branch
from
November 9, 2026 18:09
1a5e21c to
0406907
Compare
This was referenced Nov 10, 2026
vishkaty
added a commit
to vishkaty/conformance
that referenced
this pull request
Nov 11, 2026
Three cases asserting that a create does not adopt or persist members the request schema marks `omit`, and that a create without them is unaffected. Placed as `shopping/checkout/field_ownership_test.py` and registered as `shopping.checkout.field_ownership_test`, following the layout Universal-Commerce-Protocol#121 landed and dropping the redundant `checkout_` prefix the way `checkout_lifecycle_test` became `shopping.checkout.lifecycle_test`. The path and the module name are a suggestion and easy to change. Universal-Commerce-Protocol#120 made `SUITE_REGISTRY` the only path `--suite=all` runs, so the entry is what makes the module execute at all: without it `--suite=all` resolves 78 cases and selects none of these three, and with it 81. Run against the sample server from samples main: 3 passed on their own, and 81 passed for the whole suite with one skip elsewhere.
vishkaty
added a commit
to vishkaty/conformance
that referenced
this pull request
Nov 11, 2026
Four cases over cart conversion: conversion uses cart contents over the payload, a second conversion returns the existing checkout, cancel returns the cart state before deletion, and cart discount codes carry forward. Placed as `shopping/cart/cart_test.py` in a new `shopping/cart/` package, following the layout Universal-Commerce-Protocol#121 landed, and registered as `shopping.cart.cart_test`. The earlier description proposed this path once the relocation merged. Universal-Commerce-Protocol#120 made `SUITE_REGISTRY` the only path `--suite=all` runs, so the entry is what makes the module execute: without it `--suite=all` resolves 78 cases and selects none of these four, and with it 82. Run against the sample server from samples main: 4 passed.
vishkaty
added a commit
to vishkaty/conformance
that referenced
this pull request
Nov 11, 2026
Seven cases over the payment terms extension, asserted against the raw wire payload: schedule sums, term id uniqueness, selected_term_id resolution, selection handling, and accepted_term on the order. Placed as `common/payments/terms_test.py` and registered as `common.payments.terms_test`, following the layout Universal-Commerce-Protocol#121 landed. Payment terms is a common payment extension, which is why it sits beside the other payment modules rather than under `shopping/`. Universal-Commerce-Protocol#120 made `SUITE_REGISTRY` the only path `--suite=all` runs, so the entry is what makes the module reachable: without it `--suite=all` selects none of these seven. Run against the sample server from samples main: 7 skipped, for the reason the description gives, since nothing in the reference advertises `dev.ucp.common.payment.terms`.
1 of 10 tasks
damaz91
pushed a commit
that referenced
this pull request
Nov 12, 2026
Three cases asserting that a create does not adopt or persist members the request schema marks `omit`, and that a create without them is unaffected. Placed as `shopping/checkout/field_ownership_test.py` and registered as `shopping.checkout.field_ownership_test`, following the layout #121 landed and dropping the redundant `checkout_` prefix the way `checkout_lifecycle_test` became `shopping.checkout.lifecycle_test`. The path and the module name are a suggestion and easy to change. #120 made `SUITE_REGISTRY` the only path `--suite=all` runs, so the entry is what makes the module execute at all: without it `--suite=all` resolves 78 cases and selects none of these three, and with it 81. Run against the sample server from samples main: 3 passed on their own, and 81 passed for the whole suite with one skip elsewhere.
aeoess
added a commit
to aeoess/conformance
that referenced
this pull request
Nov 14, 2026
Rebased onto the tiered layout (Universal-Commerce-Protocol#121, Universal-Commerce-Protocol#122). The AP2 helpers and the mock agent profile server that declares AP2 Mandates move out of the deprecated integration_test_utils facade into common/payments/ap2_support.py, next to the test. Ap2MandateTest keeps the requires_capability gate that main added and still skips unless AP2 is in the negotiated capability intersection. Test bodies and the AP2 helpers are unchanged from afcc958. Signed-off-by: Tymofii Pidlisnyi <tima@aeoess.com>
6 of 9 tasks
vishkaty
added a commit
to vishkaty/conformance
that referenced
this pull request
Nov 17, 2026
Four cases over cart conversion: conversion uses cart contents over the payload, a second conversion returns the existing checkout, cancel returns the cart state before deletion, and cart discount codes carry forward. Placed as `shopping/cart/cart_test.py` in a new `shopping/cart/` package, following the layout Universal-Commerce-Protocol#121 landed, and registered as `shopping.cart.cart_test`. What makes the module execute: without the registry entry `--suite=all` resolves 83 cases and selects none of these four, and with it 87. Rebased onto main past Universal-Commerce-Protocol#122. The only conflict was the registry list, where Universal-Commerce-Protocol#112 and Universal-Commerce-Protocol#122 had each added an entry. The cart entry sits at the head of the shopping list, which keeps that list grouped by subpackage in alphabetical order. Obligations are cited by section name, in the module docstring and at each case, rather than by line number. The line numbers the module carried were correct when it was written and had since drifted, one of them onto an unrelated paragraph, which is the hazard of citing a moving document by line. Two cases were judging a conformant business wrongly, and both are corrected here. The discount case used the presence of the code in the response as its evidence that the code had applied, but a business may return a code it received without applying it, as the reference does for an unknown code. With a configured code that does not apply at the business under test, the case therefore ran with nothing applied, and it failed a business that carried its applied codes forward and dropped the unapplied one with a `discount_code_invalid` warning, which discount.md allows. Application now needs an applied entry naming the code or a discount in totals, so such a code skips the case instead. Carry-forward is still satisfied by naming the code, and a discount standing in for it must now be at least as large as the one on the cart, so an unrelated discount no longer counts. The contents comparison took line items as a bag of id and quantity pairs, which failed a business expressing two units as two single-unit lines. It now sums quantity per item id and leaves out lines naming a parent, which still catches a business that takes its quantities from the request payload. Verified against the flower shop reference: the module alone gives 4 passed and 0 skipped; --suite=all gives 87 executed, 85 passed, 2 skipped, 0 failures; the pinned pre-commit, ruff, ruff format and cspell are clean. Nine servers each breaking one obligation redden their own case and nothing else, and the two corrections above are each held by a server that fails the old code and passes the new one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of three PRs replacing #107 (after #120). Pure
git mv, no content changes in any test file — git reports every test as a 100% rename, so an open PR touching these files rebases onto the new paths without manual merges.shopping/<domain>/test_data/flower_shop/shopping/fixtures/flower_shop/(symlink keeps the old path)ap2_test.py,card_credential_test.py,binding_test.pycommon/payments/(binding_test.pyastoken_binding_test.py)integration_test_utils.pyshopping/base.py(94% copy; a facade keeps the old module importable)The tests still import
integration_test_utils; the facade re-exports every name they use, so nothing else changes until PR 3. Runner registry, CI paths, README paths and the wheel's package list follow the files.Verification: identical results to PR 1 (77 tests, 76 passed, 1 skipped); wheel built and inspected.