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

Function test_basic_functionality

tests/test_package_integrity.py:108–120  ·  view source on GitHub ↗

Test basic package functionality works.

()

Source from the content-addressed store, hash-verified

106
107
108def test_basic_functionality():
109 """Test basic package functionality works."""
110 from codecarbon import EmissionsTracker
111
112 # Just test that we can instantiate the tracker
113 tracker = EmissionsTracker(
114 measure_power_secs=1, tracking_mode="machine", log_level="warning"
115 )
116 assert tracker is not None
117
118 # Test that the tracker has access to data sources
119 assert tracker._data_source is not None
120 assert hasattr(tracker._data_source, "get_cloud_emissions_data")
121
122
123def test_cli_import():

Callers

nothing calls this directly

Calls 1

EmissionsTrackerClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…