mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-06 19:20:08 +00:00
39b3f19c0e
This should make it easier for other implementations to use the test data, I think. Also put a version in there so we can change inputs in the future but still talk about results meaningfully. And some other minor refactoring
19 lines
391 B
Python
19 lines
391 B
Python
"""
|
|
A module that loads pre-generated test vectors.
|
|
|
|
:ivar CHK_PATH: The path of the file containing CHK test vectors.
|
|
|
|
:ivar chk: The CHK test vectors.
|
|
"""
|
|
|
|
from yaml import safe_load
|
|
from pathlib import Path
|
|
|
|
CHK_PATH: Path = Path(__file__).parent / "test_vectors.yaml"
|
|
|
|
try:
|
|
with CHK_PATH.open() as f:
|
|
chk: dict[str, str] = safe_load(f)
|
|
except FileNotFoundError:
|
|
chk = {}
|