-
Couldn't load subscription status.
- Fork 201
Closed
Description
When working on #315, I discovered that tests missing household and SPM info will run, but if the output they are testing needs to use the size of the household in its calculation, an error message with completely different info is thrown. Not urgent, but good to know, as I imagine we'll run into this again as we add more and more tests.
This code:
- name: Family of 3
period: 2022
absolute_error_margin: 0.01
input:
people:
person_1:
age: 30
person_2:
age: 50
person_3:
age: 35
output:
# Ineligible as a family of 3.
snap_minimum_benefit: 0
Throws this error:
Test 'Family of 3':
snap_minimum_benefit@2022: [195.84 195.84 195.84] differs from 0.0 with an absolute margin [195.84 195.84 195.84] > 0.01
The proper code looks like this:
- name: Family of 3
period: 2022
absolute_error_margin: 0.01
input:
people:
person_1:
age: 30
person_2:
age: 50
person_3:
age: 35
spm_units:
spm_unit:
members: [person_1, person_2, person_3]
households:
household:
state_group: CONTIGUOUS_US
output:
# Ineligible as a family of 3.
snap_minimum_benefit: 0
Metadata
Metadata
Assignees
Labels
No labels