Page MenuHomeSoftware Heritage

D3944.id13886.diff
No OneTemporary

D3944.id13886.diff

diff --git a/swh/graph/tests/test_cli.py b/swh/graph/tests/test_cli.py
--- a/swh/graph/tests/test_cli.py
+++ b/swh/graph/tests/test_cli.py
@@ -6,6 +6,7 @@
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Dict
+from yaml import dump
from click.testing import CliRunner
@@ -34,10 +35,21 @@
runner = CliRunner()
with TemporaryDirectory(suffix=".swh-graph-test") as tmpdir:
+ config_path = Path(tmpdir, "config.yml")
+ with open(config_path, "w") as f:
+ dump(config, f)
+
result = runner.invoke(
cli,
- ["compress", "--graph", DATA_DIR / "example", "--outdir", tmpdir],
- obj={"config": config},
+ [
+ "--config-file",
+ config_path,
+ "compress",
+ "--graph",
+ DATA_DIR / "example",
+ "--outdir",
+ tmpdir,
+ ],
)
assert result.exit_code == 0, result
properties = read_properties(Path(tmpdir) / "example.properties")

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 2:54 PM (12 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3231022

Event Timeline