Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066542
D3944.id13886.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3944.id13886.diff
View Options
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
Details
Attached
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
Attached To
D3944: test_cli.py: fix passing custom config to CLI
Event Timeline
Log In to Comment