You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream addons-source PR 949 split TMGimporter/tests/test_libtmg.py into
pure-function tests (test_libtmg.py, every OS) and DB-backed tests
(test_linux_libtmg.py, Linux-only via the test_linux_* filename convention)
and merged to maintenance/gramps60. The maintainer's cherry-pick forward
to maintenance/gramps61failed, and he asked for a separate gramps61 PR:
Cherry picking this to gramps61 failed. Need a new PR for the changes for gramps61.
— @GaryGriffin
Why the cherry-pick fails
maintenance/gramps61's test_libtmg.py has independently diverged from
the gramps60 version that split was cut against. gramps61 added, in exactly the
regions the split rewrites:
an inline gi.require_version("Gtk"/"Gdk", "3.0") + SkipTest block at the top, and
a sys.platform == "win32" skip inside the shared _make_db() helper.
The patch's context lines (the old _make_db body, import tempfile) no longer
match, so git cannot replay it.
Target state — converge gramps61 onto gramps60's post-split structure
Make TMGimporter/tests/ on maintenance/gramps61identical to maintenance/gramps60 after the split:
test_libtmg.py → pure-function tests only (gramps60 blob 4851746a).
inline GTK pin — GTK-version pinning is not an individual test file's
job. It is owned by the central repo-root tests/__init__.py (the central
repo-root pin, present on both branches), by Gramps' own GUI launcher, and —
for per-addon invocation — by the planned per-addon tests/__init__.py
migration (Move inline gi.require_version pins into each addon's tests/__init__.py #38). Under the testbed harness the GI versions are also pinned by
the gi_bootstrap sitecustomize. gramps60's merged files carry no inline pin.
win32 skip in _make_db() — superseded by the file split: the DB tests
now live in test_linux_*, which the Windows lane excludes, so the runtime
skip is redundant. gramps60's merged test_linux_libtmg.py carries no win32 skip and is green on the maintainer's CI.
The gramps60 split is merged and green on the maintainer's CI (he is asking to
port it, not revert) — proving the test_linux_* Windows-exclusion works and
that dropping both stopgaps is the production-correct shape.
Testbed Linux runner (engine/scripts/ubuntu/run-addon-unit.sh) runs test_linux_* on Linux (excludes only test_windows_*), so the DB tests run
against the matching gramps 6.1.
Summary
Upstream addons-source PR 949 split
TMGimporter/tests/test_libtmg.pyintopure-function tests (
test_libtmg.py, every OS) and DB-backed tests(
test_linux_libtmg.py, Linux-only via thetest_linux_*filename convention)and merged to
maintenance/gramps60. The maintainer's cherry-pick forwardto
maintenance/gramps61failed, and he asked for a separate gramps61 PR:Why the cherry-pick fails
maintenance/gramps61'stest_libtmg.pyhas independently diverged fromthe gramps60 version that split was cut against. gramps61 added, in exactly the
regions the split rewrites:
gi.require_version("Gtk"/"Gdk", "3.0")+SkipTestblock at the top, andsys.platform == "win32"skip inside the shared_make_db()helper.The patch's context lines (the old
_make_dbbody,import tempfile) no longermatch, so git cannot replay it.
Target state — converge gramps61 onto gramps60's post-split structure
Make
TMGimporter/tests/onmaintenance/gramps61identical tomaintenance/gramps60after the split:test_libtmg.py→ pure-function tests only (gramps60 blob4851746a).test_linux_libtmg.py→ DB-backed tests + helpers (gramps60 blob35bd117).tests/__init__.pystays empty (already matches gramps60).This drops the two gramps61-only stopgaps:
job. It is owned by the central repo-root
tests/__init__.py(the centralrepo-root pin, present on both branches), by Gramps' own GUI launcher, and —
for per-addon invocation — by the planned per-addon
tests/__init__.pymigration (Move inline gi.require_version pins into each addon's tests/__init__.py #38). Under the testbed harness the GI versions are also pinned by
the
gi_bootstrapsitecustomize. gramps60's merged files carry no inline pin.win32skip in_make_db()— superseded by the file split: the DB testsnow live in
test_linux_*, which the Windows lane excludes, so the runtimeskip is redundant. gramps60's merged
test_linux_libtmg.pycarries nowin32skip and is green on the maintainer's CI.Out of scope
gramps 6.1 lands on conda-forge; this only brings gramps61's mechanism in
line with gramps60.
TMGimporter/tests/__init__.pyis Move inline gi.require_version pins into each addon's tests/__init__.py #38's coordinated, repo-wide rollout (depends on the empty
__init__.pygroundwork), not this PR.
Verification
port it, not revert) — proving the
test_linux_*Windows-exclusion works andthat dropping both stopgaps is the production-correct shape.
engine/scripts/ubuntu/run-addon-unit.sh) runstest_linux_*on Linux (excludes onlytest_windows_*), so the DB tests runagainst the matching gramps 6.1.
References