Skip to content

test: make the Python suite green on Windows - #68

Merged
TimelordUK merged 1 commit into
mainfrom
test/windows-python-suite-green
Sep 6, 2026
Merged

test: make the Python suite green on Windows#68
TimelordUK merged 1 commit into
mainfrom
test/windows-python-suite-green

Conversation

@TimelordUK

Copy link
Copy Markdown
Owner

Local runs on Windows had a standing 7-failure baseline that was green in CI. It was recorded as one problem — the missing .exe suffix — but probing each failure showed three unrelated causes, only one of which was the suffix.

test_quoted_columns (5 failures) — the .exe suffix, and the only genuine instance. Note this bites solely because the file guards with exists(); the ~35 other files that hardcode a suffixless path work anyway, because Windows CreateProcess appends .exe itself. Fixed with the same idiom test_in_between_operators.py and tests/comparison/engines.py already carry.

test_unnest — same omission, worse symptom, and not previously noticed because nothing failed: the release exists() check fails, the file falls through to its target/debug fallback, and CreateProcess then resolves that to sql-cli.exe. The tests passed while exercising the DEBUG binary.

test_sql_comments (1) — not the suffix at all. NamedTemporaryFile(mode='w') writes in the platform's preferred encoding, cp1252 here, so the tests carrying scientific notation (a0, pi, epsilon0, hbar) raised UnicodeEncodeError before the CLI was invoked. Fixed in the test with encoding='utf-8' rather than by requiring PYTHONUTF8=1 in the runner.

test_web_cte_advanced (1) — also not the suffix. --query-plan prints the AST and then executes the query anyway, so the test attempts a fetch it believes it is avoiding. A refused localhost connection is instant on Linux and ~2.4s on Windows, against a timeout=2. Timeout raised to 15s and the real cause recorded in place: --query-plan should not execute.

Local suite now 534 passed, 0 failed, with no env-var prefix needed.

Claude-Session: https://claude.ai/code/session_01JBEUeckCwmWXoWTpQUTDqP

Local runs on Windows had a standing 7-failure baseline that was green in
CI. It was recorded as one problem — the missing .exe suffix — but probing
each failure showed three unrelated causes, only one of which was the
suffix.

test_quoted_columns (5 failures) — the .exe suffix, and the only genuine
instance. Note this bites solely because the file guards with `exists()`;
the ~35 other files that hardcode a suffixless path work anyway, because
Windows CreateProcess appends .exe itself. Fixed with the same idiom
test_in_between_operators.py and tests/comparison/engines.py already carry.

test_unnest — same omission, worse symptom, and not previously noticed
because nothing failed: the release `exists()` check fails, the file falls
through to its `target/debug` fallback, and CreateProcess then resolves
that to sql-cli.exe. The tests passed while exercising the DEBUG binary.

test_sql_comments (1) — not the suffix at all. NamedTemporaryFile(mode='w')
writes in the platform's preferred encoding, cp1252 here, so the tests
carrying scientific notation (a0, pi, epsilon0, hbar) raised
UnicodeEncodeError before the CLI was invoked. Fixed in the test with
encoding='utf-8' rather than by requiring PYTHONUTF8=1 in the runner.

test_web_cte_advanced (1) — also not the suffix. --query-plan prints the
AST and then executes the query anyway, so the test attempts a fetch it
believes it is avoiding. A refused localhost connection is instant on Linux
and ~2.4s on Windows, against a timeout=2. Timeout raised to 15s and the
real cause recorded in place: --query-plan should not execute.

Local suite now 534 passed, 0 failed, with no env-var prefix needed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JBEUeckCwmWXoWTpQUTDqP
@TimelordUK
TimelordUK merged commit adca83c into main Sep 6, 2026
3 checks passed
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.

1 participant