Skip to content

Commit a6aae23

Browse files
committed
Make sure that the returned grid is not None
`microgrid.grid.get()` returns `Grid | None`, so before accessing any attributes from `grid` we need to make sure it is not `None`. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 3792906 commit a6aae23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/microgrid/test_grid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ async def test_grid() -> None:
5555
microgrid.grid.initialize(components)
5656

5757
grid = microgrid.grid.get()
58+
assert grid is not None
5859

5960
expected_fuse_current = Current.from_amperes(123.0)
6061
expected_fuse = Fuse(expected_fuse_current)

0 commit comments

Comments
 (0)