[PR #3077] [MERGED] Tests: the parity-reach fixture names files the way the tool does #4787

Closed
opened 2026-11-03 05:07:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3077
Author: @Domanffe
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: test/parity-reach-posix-fixture


📝 Commits (1)

  • aef4186 Tests: the parity-reach fixture names files the way the tool does

📊 Changes

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

View changed files

📝 tests/test_parity_reach.py (+1 -1)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

The fixture in tests/test_parity_reach.py built its dependency list from
str(path.relative_to(self.root)), which keeps the host's separators, while
parity_reach.narrow and its SourceGraph key every file by Posix path
(path.startswith("crates/"), path.count("/"), relative_to(...).as_posix()).
On Windows the fixture therefore produced crates\\a\\src\\used.rs, its own
remove("crates/a/examples/probe/main.rs") raised ValueError, and all seven
tests in the module errored in setUp before reaching the tool.

as_posix() in the fixture names the files the way the tool does. The tests
and the tool are unchanged otherwise.

Evidence, Windows 11:

  • before: python -m unittest tests.test_parity_reach → Ran 7 tests ... FAILED (errors=7) (8 in the module run together with the other port tests),
    every one ValueError: list.remove(x): x not in list;
  • after, on this commit: Ran 7 tests ... OK.

On Linux and macOS the fixture is byte-for-byte the same as before, since
str(Path) already used slashes there.


🔄 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/horizon-rust/horizon/pull/3077 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `test/parity-reach-posix-fixture` --- ### 📝 Commits (1) - [`aef4186`](https://github.com/horizon-rust/horizon/commit/aef4186de4acf84845fd1eaeb1b465fbd1d56855) Tests: the parity-reach fixture names files the way the tool does ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_parity_reach.py` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. The fixture in `tests/test_parity_reach.py` built its dependency list from `str(path.relative_to(self.root))`, which keeps the host's separators, while `parity_reach.narrow` and its `SourceGraph` key every file by Posix path (`path.startswith("crates/")`, `path.count("/")`, `relative_to(...).as_posix()`). On Windows the fixture therefore produced `crates\\a\\src\\used.rs`, its own `remove("crates/a/examples/probe/main.rs")` raised `ValueError`, and all seven tests in the module errored in `setUp` before reaching the tool. `as_posix()` in the fixture names the files the way the tool does. The tests and the tool are unchanged otherwise. Evidence, Windows 11: - before: `python -m unittest tests.test_parity_reach` → `Ran 7 tests ... FAILED (errors=7)` (8 in the module run together with the other port tests), every one `ValueError: list.remove(x): x not in list`; - after, on this commit: `Ran 7 tests ... OK`. On Linux and macOS the fixture is byte-for-byte the same as before, since `str(Path)` already used slashes there. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:57 +07:00
Sign in to join this conversation.
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
horizon-rust/horizon#4787
No description provided.