Skip to content

Add $pop tests#603

Open
PatersonProjects wants to merge 1 commit into
documentdb:mainfrom
PatersonProjects:pop_tests
Open

Add $pop tests#603
PatersonProjects wants to merge 1 commit into
documentdb:mainfrom
PatersonProjects:pop_tests

Conversation

@PatersonProjects

Copy link
Copy Markdown
Contributor

This PR adds the tests for the $pop array update operator.

Ref: Issue #36, #381

Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
@PatersonProjects PatersonProjects requested a review from a team as a code owner June 12, 2026 21:23
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 12, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (603+1 LOC, 7 files); LLM: Adds new test cases for the $pop array update operator, expanding compatibility test coverage.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

]


@pytest.mark.parametrize("test", pytest_params(TESTS + UPSERT_TESTS))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Minor] pytest_params(TESTS + UPSERT_TESTS) mixes general-behavior and upsert cases through one runner that branches on test.upsert. Splitting into two parametrize calls (or two named runners) would give clearer test IDs and let upsert-specific invariants be asserted without per-case branching.



@pytest.mark.parametrize("test", pytest_params(POP_COMBINATION_TESTS))
def test_pop_combination(collection, test: UpdateTestCase):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Minor] test_pop_combination duplicates the body of test_positional_query_operators above (insert → run update → find → assert). Since POP_COMBINATION_TESTS is the same list[UpdateTestCase] shape, consider merging into a single parametrize+runner or extracting a small helper to avoid the copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants