Skip to content

Commit bee4f9a

Browse files
committed
test: make adapter YAML-parity assertion order-independent
test_fallback_precedence_and_yaml_parity compared discover_adapters() output (filesystem scan order, varies by OS/filesystem) against the YAML manifest order as an ordered list, so it failed on some runners. Parity means the same set of adapters, not the same order — compare sorted. Signed-off-by: aviv ron <rona@il.ibm.com>
1 parent ea342fb commit bee4f9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/composer/test_adapter_loader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ def test_fallback_precedence_and_yaml_parity(self, tmp_path):
541541

542542
# Verification of Parity: compare (path, name, technology) - source differs by design
543543
# discover_adapters returns source=None, discover_adapters_from_yaml returns source=manifest_path
544+
# Compare order-independently: discover_adapters walks the filesystem (scan
545+
# order varies by OS/filesystem) while the YAML path follows manifest order,
546+
# so parity means the same set of adapters, not the same ordering.
544547
adapters_without_source = [(p, n, t) for p, n, t, _ in adapters]
545548
yaml_without_source = [(p, n, t) for p, n, t, _ in yaml_adapters]
546-
assert adapters_without_source == yaml_without_source
549+
assert sorted(adapters_without_source) == sorted(yaml_without_source)

0 commit comments

Comments
 (0)