File tree Expand file tree Collapse file tree 2 files changed +5
-33
lines changed
src/frequenz/microgrid_component_graph Expand file tree Collapse file tree 2 files changed +5
-33
lines changed Original file line number Diff line number Diff line change 11# License: MIT
22# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33
4- """Python bindings for the Frequenz microgrid component graph rust library..
5-
6- TODO(cookiecutter): Add a more descriptive module description.
7- """
8-
9-
10- # TODO(cookiecutter): Remove this function
11- def delete_me (* , blow_up : bool = False ) -> bool :
12- """Do stuff for demonstration purposes.
13-
14- Args:
15- blow_up: If True, raise an exception.
16-
17- Returns:
18- True if no exception was raised.
19-
20- Raises:
21- RuntimeError: if blow_up is True.
22- """
23- if blow_up :
24- raise RuntimeError ("This function should be removed!" )
25- return True
4+ """Python bindings for the Frequenz microgrid component graph rust library."""
Original file line number Diff line number Diff line change 22# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33
44"""Tests for the frequenz.microgrid_component_graph package."""
5- import pytest
65
7- from frequenz . microgrid_component_graph import delete_me
6+ from frequenz import microgrid_component_graph
87
98
10- def test_microgrid_component_graph_succeeds () -> None : # TODO(cookiecutter): Remove
11- """Test that the delete_me function succeeds."""
12- assert delete_me () is True
13-
14-
15- def test_microgrid_component_graph_fails () -> None : # TODO(cookiecutter): Remove
16- """Test that the delete_me function fails."""
17- with pytest .raises (RuntimeError , match = "This function should be removed!" ):
18- delete_me (blow_up = True )
9+ def test_loading () -> None :
10+ """Test that the microgrid_component_graph module loads correctly."""
11+ assert microgrid_component_graph is not None
You can’t perform that action at this time.
0 commit comments