Skip to content

Commit

Permalink
test: Re-add extension tests, which now pass
Browse files Browse the repository at this point in the history
  • Loading branch information
anth-volk committed Oct 16, 2024
1 parent 68e92ae commit 0167018
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
4 changes: 3 additions & 1 deletion changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- bump: minor
changes:
changed:
- Shallow copy GroupEntities and PopulationEntity when cloning TaxBenefitSystem object
- Shallow copy GroupEntities and PopulationEntity when cloning TaxBenefitSystem object
added:
- Two tests related to extensions that were previously removed
7 changes: 7 additions & 0 deletions tests/core/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ def test_with_reform(tax_benefit_system):
)


def test_with_extension(tax_benefit_system):
assert (
run_yaml_test(tax_benefit_system, "test_with_extension.yaml")
== EXIT_OK
)


def test_with_anchors(tax_benefit_system):
assert (
run_yaml_test(tax_benefit_system, "test_with_anchors.yaml") == EXIT_OK
Expand Down
28 changes: 28 additions & 0 deletions tests/fixtures/yaml_tests/test_with_extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
- name: "Test using an extension"
period: 2017-01
extensions:
- policyengine_core.extension_template
input:
persons:
parent: {}
child1: {}
household:
parents: [parent]
children: [child1]
output:
local_town_child_allowance: 100

- name: "Test using an extension"
period: 2017-01
extensions:
- policyengine_core.extension_template
input:
persons:
parent: {}
child1: {}
child2: {}
household:
parents: [parent]
children: [child1, child2]
output:
local_town_child_allowance: 200

0 comments on commit 0167018

Please sign in to comment.