[PR #1248] tests: skip merge_check cases on a git without merge-tree --write-tree (TEST-MERGE-CHECK-OLD-GIT) #1281

Open
opened 2026-11-26 20:20:43 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1248
Author: @TheGeogeo
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: test/merge-check-old-git


📝 Commits (1)

  • 6a4500d tests: skip merge_check cases on a git without merge-tree --write-tree (TEST-MERGE-CHECK-OLD-GIT)

📊 Changes

1 file changed (+24 additions, -0 deletions)

View changed files

📝 tests/test_merge_check.py (+24 -0)

📄 Description

Claimed in the coordination issue as: TEST-MERGE-CHECK-OLD-GIT — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144000568

What and why

scripts/merge_check.py documents git 2.38 or newer for merge-tree --write-tree, but its test does not check for it. On an older git, 18 of the 24 tests fail with JSONDecodeError or a wrong message, which reads as a broken tool. Those 18 tests now skip with the reason when git merge-tree -h does not offer --write-tree. The other six keep running, and nothing is skipped on a git that has the option.

Tested

On Windows 11, Python 3.12.4, on main at 66d4f5aa (6a4500d8):

  • git 2.36.0.windows.1: python -I -B tests/test_merge_check.py gave 17 errors and 2 subtest failures before (measured on 2e026b03). Now 24 run, 18 skipped, OK.
  • git 2.56.1.windows.1: 24 run, none skipped, OK.
  • Negative control on git 2.56.1 (before this rebase, same patch): with the tool's --write-tree replaced by an unknown option, the suite still fails (17 errors, 2 subtest failures) instead of skipping.
  • The probe gives the same answer outside a repository.
  • Merge with #1226 (d6031591), which edits the same file (before this rebase, same patch): no conflict; 18 skipped on git 2.36.0, 24 OK on git 2.56.1.
  • test_tool_stdout_encoding.py, test_text_write_line_endings.py, test_docs_links.py, test_docs_cli_flags.py, compileall, git diff --check and the no-game-data check passed (before this rebase, same patch).

GPUs tested: n/a (CPU-only synthetic tests).

AI-assisted: yes (Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1248 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/merge-check-old-git` --- ### 📝 Commits (1) - [`6a4500d`](https://github.com/ubiquitarianism/leonida/commit/6a4500d889d5d1cf7be8a98c1952cc660585d7e1) tests: skip merge_check cases on a git without merge-tree --write-tree (TEST-MERGE-CHECK-OLD-GIT) ### 📊 Changes **1 file changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_merge_check.py` (+24 -0) </details> ### 📄 Description Claimed in the coordination issue as: TEST-MERGE-CHECK-OLD-GIT — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144000568 ### What and why `scripts/merge_check.py` documents git 2.38 or newer for `merge-tree --write-tree`, but its test does not check for it. On an older git, 18 of the 24 tests fail with `JSONDecodeError` or a wrong message, which reads as a broken tool. Those 18 tests now skip with the reason when `git merge-tree -h` does not offer `--write-tree`. The other six keep running, and nothing is skipped on a git that has the option. ### Tested On Windows 11, Python 3.12.4, on `main` at `66d4f5aa` (`6a4500d8`): - git 2.36.0.windows.1: `python -I -B tests/test_merge_check.py` gave 17 errors and 2 subtest failures before (measured on `2e026b03`). Now 24 run, 18 skipped, OK. - git 2.56.1.windows.1: 24 run, none skipped, OK. - Negative control on git 2.56.1 (before this rebase, same patch): with the tool's `--write-tree` replaced by an unknown option, the suite still fails (17 errors, 2 subtest failures) instead of skipping. - The probe gives the same answer outside a repository. - Merge with #1226 (`d6031591`), which edits the same file (before this rebase, same patch): no conflict; 18 skipped on git 2.36.0, 24 OK on git 2.56.1. - `test_tool_stdout_encoding.py`, `test_text_write_line_endings.py`, `test_docs_links.py`, `test_docs_cli_flags.py`, `compileall`, `git diff --check` and the no-game-data check passed (before this rebase, same patch). GPUs tested: n/a (CPU-only synthetic tests). AI-assisted: yes (Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1281
No description provided.