Skip to content

Commit

Permalink
fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippPlank committed Aug 1, 2024
1 parent a6a56b8 commit ee67e90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/lava/magma/compiler/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def create_patches(
and the compile() method returns the given ChannelMap unchanged.
."""

def compile_return(channel_map: ChannelMap) -> ChannelMap:
def compile_return(channel_map: ChannelMap,
partitioning=None) -> ChannelMap:
return channel_map

py_patch = patch(
Expand Down Expand Up @@ -397,7 +398,7 @@ def test_compile_proc_group_single_loop(self) -> None:
# exactly once. After that, the while loop should exit because the
# ChannelMap instance has not changed.
for sc in subcompilers:
sc.compile.assert_called_once_with({})
sc.compile.assert_called_once_with({}, None)

def test_compile_proc_group_multiple_loops(self) -> None:
"""Test whether the correct methods are called on all objects when
Expand Down Expand Up @@ -431,7 +432,7 @@ def test_compile_proc_group_multiple_loops(self) -> None:
# exactly once. After that, the while loop should exit because the
# ChannelMap instance has not changed.
for sc in subcompilers:
sc.compile.assert_called_with({**channel_map1, **channel_map2})
sc.compile.assert_called_with({**channel_map1, **channel_map2}, None)
self.assertEqual(sc.compile.call_count, 3)

def test_extract_proc_builders(self) -> None:
Expand Down Expand Up @@ -512,7 +513,7 @@ def test_compile_proc_groups(self) -> None:
with py_patch:
# Call the method to be tested.
proc_builders, channel_map = self.compiler._compile_proc_groups(
proc_groups, channel_map, None
proc_groups, channel_map
)

# There should be six Process Builders...
Expand Down

0 comments on commit ee67e90

Please sign in to comment.