Skip to content

Commit

Permalink
Fix PolicyFunction arg in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MImmesberger committed Jan 28, 2025
1 parent 12c3807 commit 92d5395
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/_gettsim_tests/test_time_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_should_create_functions_for_other_time_units_for_functions(
self, name: str, expected: list[str]
) -> None:
time_conversion_functions = create_time_conversion_functions(
{name: PolicyFunction(lambda: 1, function_name="test")}, []
{name: PolicyFunction(lambda: 1, leaf_name="test")}, []
)

for expected_name in expected:
Expand Down Expand Up @@ -209,7 +209,7 @@ def test_should_create_functions_for_other_time_units_for_data_cols(

def test_should_not_create_functions_automatically_that_exist_already(self) -> None:
time_conversion_functions = create_time_conversion_functions(
{"test1_d": PolicyFunction(lambda: 1, function_name="test1_d")}, ["test2_y"]
{"test1_d": PolicyFunction(lambda: 1, leaf_name="test1_d")}, ["test2_y"]
)

assert "test1_d" not in time_conversion_functions
Expand All @@ -219,7 +219,7 @@ def test_should_overwrite_functions_with_data_cols_that_only_differ_in_time_peri
self,
) -> None:
time_conversion_functions = create_time_conversion_functions(
{"test_d": PolicyFunction(lambda: 1, function_name="test_d")}, ["test_y"]
{"test_d": PolicyFunction(lambda: 1, leaf_name="test_d")}, ["test_y"]
)

assert "test_d" in time_conversion_functions
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_should_apply_converter(self):
# https://github.com/iza-institute-of-labor-economics/gettsim/issues/621
def test_should_not_create_cycle():
time_conversion_functions = create_time_conversion_functions(
{"test_d": PolicyFunction(lambda test_m: test_m, function_name="test")}, []
{"test_d": PolicyFunction(lambda test_m: test_m, leaf_name="test")}, []
)

assert "test_m" not in time_conversion_functions

0 comments on commit 92d5395

Please sign in to comment.