def test_derex_runmode_wrong(minimal_project): with minimal_project: project = Project() # Use low level API to inject invalid value project._set_status("runmode", "garbage-not-a-valid-runmode") result = runner.invoke(derex_cli_group, "runmode") # Ensure presence of error message assert "garbage-not-a-valid-runmode" in result.stderr assert "is not valid as" in result.stderr
def test_derex_runmode_wrong(testproj): from derex.runner.cli import derex with testproj: project = Project() # Use low level API to inject invalid value project._set_status("runmode", "garbage") result = runner.invoke(derex, ["runmode"]) # Ensure presence of error message assert "not valid" in result.stderr