"""Shared fixtures and helpers for node tests.""" from pathlib import Path from meshbay_node.roots import RootSet def one_root(path: Path, *, name: str = "", kind: str = "generic") -> RootSet: """ A RootSet with a single root over `path`, receiving uploads. The equivalent of the old `shared_dir`. Note what it implies for assertions: a file directly in `path` now has `entry.path == `, not `""` — every index path carries its root name, in a group with one root as much as in a group with five. """ return RootSet.build([{"path": str(path), "name": name, "kind": kind, "upload": True}])