Skip to content

Commit 03d4c87

Browse files
committed
Give the sheet encoding test cases short ids
pytest puts each test id in PYTEST_CURRENT_TEST, and Windows caps an environment variable at 32,767 characters; one case's id was 70,000.
1 parent ebc0125 commit 03d4c87

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ All notable changes to libre-devops-helpers are recorded here. The project follo
9898
- `just use` and `just token` ran commands that had moved under `az` and `entra`.
9999
- Four CLI tests failed in GitHub Actions, where Typer styles and wraps usage errors; they
100100
now compare the message's plain text.
101+
- A sheet test's 70,000 character id failed on Windows, which caps an environment
102+
variable (pytest's `PYTEST_CURRENT_TEST`) at 32,767 characters; its cases have short ids.
101103

102104
### Security
103105

‎tests/core/test_sheets.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ def test_a_document_type_declaration_is_refused_before_parsing(tmp_path, monkeyp
182182
'<?xml version="1.0" encoding="utf-8"?><worksheet/>'.encode("utf-16"),
183183
b'<?xml version="1.0"' + b" " * 70_000 + b"?><worksheet/>",
184184
],
185+
# Short ids: pytest puts the id in PYTEST_CURRENT_TEST, and Windows caps a variable
186+
# at 32,767 characters.
187+
ids=["cp037", "utf-16 declared", "utf-16 bytes", "a long declaration"],
185188
)
186189
def test_a_part_in_another_encoding_is_refused(tmp_path, content):
187190
parts: dict[str, str | bytes] = dict(workbook_parts({"Plan": []}))

0 commit comments

Comments
 (0)