Test basic package functionality works.
()
| 106 | |
| 107 | |
| 108 | def 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 | |
| 123 | def test_cli_import(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…