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

Function test_get_config_reads_codecarbon_section

tests/cli/test_cli_utils.py:8–14  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

6
7
8def test_get_config_reads_codecarbon_section(tmp_path):
9 config_path = tmp_path / ".codecarbon.config"
10 config_path.write_text("[codecarbon]\napi_endpoint=https://example.test\n")
11
12 config = cli_utils.get_config(config_path)
13
14 assert config["api_endpoint"] == "https://example.test"
15
16
17def test_get_config_raises_when_missing(tmp_path):

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…