(monkeypatch)
| 209 | |
| 210 | |
| 211 | def 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 | |
| 219 | def test_show_config_prints_missing_project_and_experiment( |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…