Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/test_cli.py
Show All 26 Lines | for command in ( | ||||
"iter-revisions", | "iter-revisions", | ||||
): | ): | ||||
assert f" {command} " in commands | assert f" {command} " in commands | ||||
def test_cli_create_deprecated(provenance_db, tmp_path): | def test_cli_create_deprecated(provenance_db, tmp_path): | ||||
conffile = tmp_path / "config.yml" | conffile = tmp_path / "config.yml" | ||||
conf = { | conf = { | ||||
"provenance": {"cls": "local", "with_path": True,}, | "provenance": { | ||||
"cls": "local", | |||||
"with_path": True, | |||||
}, | |||||
} | } | ||||
yaml.dump(conf, conffile.open("w")) | yaml.dump(conf, conffile.open("w")) | ||||
result = CliRunner().invoke( | result = CliRunner().invoke( | ||||
swhmain, ["provenance", "--config-file", str(conffile), "create", "--drop"] | swhmain, ["provenance", "--config-file", str(conffile), "create", "--drop"] | ||||
) | ) | ||||
assert result.exit_code == 0, result.output | assert result.exit_code == 0, result.output | ||||
assert "DeprecationWarning" in result.output | assert "DeprecationWarning" in result.output | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |