]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix pytest-xdist loadscope splitting on "::" in params 12103/head
authorMichal Nowak <mnowak@isc.org>
Tue, 26 May 2026 16:09:21 +0000 (16:09 +0000)
committerMichal Nowak <mnowak@isc.org>
Thu, 28 May 2026 16:00:17 +0000 (18:00 +0200)
commit4eb893020e4f285fbc82021a01d49b110d79c30c
tree2587a10408d3e4f426b0bc715784fcaad92477dd
parent2f2d5462ef8fceec1380612696640c9a63c0a513
Fix pytest-xdist loadscope splitting on "::" in params

LoadScopeScheduling._split_scope() uses rsplit("::", 1) to
extract the test file scope from a node ID.  When parametrized
test values contain "::" (IPv6 addresses like "cafe:cafe::cafe"
or "::1"), the split lands inside the parameter instead of at
the .py:: boundary.  This creates spurious scopes that get
assigned to different workers, each triggering a full fixture
setup (starting named instances).

Override _split_scope() in conftest.py to split on ".py::"
which is unambiguous.

Six tests in synthrecord/tests_synthrecord.py are affected.
A verification script is included in util/.

Assisted-by: Claude:claude-opus-4-7
bin/tests/system/conftest.py