We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
run()
1 parent 27bc6d6 commit c44d6ffCopy full SHA for c44d6ff
test/test_staged_script.py
@@ -223,6 +223,18 @@ def test_run_override_print_commands(
223
assert f"Executing: {command}" in captured.out
224
225
226
+def test_run_dry_run(
227
+ script: StagedScript, capsys: pytest.CaptureFixture
228
+) -> None:
229
+ """Test the :func:`run` method in dry-run mode."""
230
+ command = "echo 'dry-run mode'"
231
+ script.dry_run = True
232
+ script.run(command)
233
+ captured = capsys.readouterr()
234
+ for _ in ["The command executed would be", command]:
235
+ assert _ in captured.out
236
+
237
238
@pytest.mark.parametrize("script_success", [True, False])
239
@pytest.mark.parametrize(
240
"extras",
0 commit comments