MCPcopy Create free account
hub / github.com/mlco2/codecarbon / test_get_token_command_prints_token

Function test_get_token_command_prints_token

tests/cli/test_cli_main.py:211–216  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

209
210
211def test_get_token_command_prints_token(monkeypatch):
212 monkeypatch.setattr(cli_main, "get_api_key", lambda project_id: "abc123")
213 runner = CliRunner()
214 result = runner.invoke(cli_main.codecarbon, ["get-token", "proj-id"])
215 assert result.exit_code == 0
216 assert "Your token: abc123" in result.output
217
218
219def test_show_config_prints_missing_project_and_experiment(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…