Skip to content

Commit 827f49b

Browse files
Rusty Conoverclaude
andcommitted
Give the oversized-token parametrization short test ids
pytest copies the test id into PYTEST_CURRENT_TEST. With the 32 KiB+ token value as its id, setup and teardown raised 'the environment variable is longer than 32767 characters' on Windows, which also cut the CI log off at the ERRORS header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8018f6c commit 827f49b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎tests/catalog/test_constraint_contract.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,13 @@ def test_snapshot_rejects_duplicate_keys_labels_and_primary_keys() -> None:
322322
)
323323

324324

325-
@pytest.mark.parametrize("value", [b"", "not-bytes", b"x" * (contract.MAX_CONSTRAINT_TOKEN_BYTES + 1)])
325+
# Explicit ids: an oversized value as the test id overflows PYTEST_CURRENT_TEST,
326+
# and Windows limits an environment variable to 32,767 characters.
327+
@pytest.mark.parametrize(
328+
"value",
329+
[b"", "not-bytes", b"x" * (contract.MAX_CONSTRAINT_TOKEN_BYTES + 1)],
330+
ids=["empty", "not-bytes", "over-limit"],
331+
)
326332
def test_revisions_and_owner_tokens_are_nonempty_bounded_bytes(value: bytes | str) -> None:
327333
for kwargs in [{"attach_opaque_data": value}, {"expected_revision": value}, {"transaction_opaque_data": value}]:
328334
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)