|
| 1 | +# Test HBWD earned income exemption handling |
| 2 | +# Per § 120.510(i), exemptions apply only to disabled/blind persons. |
| 3 | +# Non-disabled/non-blind persons use gross income (no exemptions). |
| 4 | +# If spouse is disabled/blind, they also get exemptions. |
| 5 | + |
| 6 | +# Test 1: Disabled worker gets earned income exemptions |
| 7 | +- name: Case 1, disabled worker gets earned income exemptions. |
| 8 | + period: 2025-01 |
| 9 | + absolute_error_margin: 0.5 |
| 10 | + input: |
| 11 | + age: 49 |
| 12 | + is_disabled: true |
| 13 | + is_blind: false |
| 14 | + il_aabd_gross_earned_income: 125 |
| 15 | + il_aabd_expense_exemption_person: 0 |
| 16 | + il_aabd_gross_unearned_income: 0 |
| 17 | + state_code: IL |
| 18 | + output: |
| 19 | + # Disabled worker gets exemptions: 125 - 25(flat) - 20 - 30(50% of 60) = 50 |
| 20 | + il_hbwd_countable_earned_income: 50 |
| 21 | + |
| 22 | +# Test 2: Non-disabled, non-blind person uses gross income (no exemptions) |
| 23 | +- name: Case 2, non-disabled person uses gross income. |
| 24 | + period: 2025-01 |
| 25 | + absolute_error_margin: 0.5 |
| 26 | + input: |
| 27 | + age: 47 |
| 28 | + is_disabled: false |
| 29 | + is_blind: false |
| 30 | + il_aabd_gross_earned_income: 125 |
| 31 | + il_aabd_expense_exemption_person: 0 |
| 32 | + il_aabd_gross_unearned_income: 0 |
| 33 | + state_code: IL |
| 34 | + output: |
| 35 | + # Non-disabled, non-blind person: uses il_hbwd_gross_earned_income (not set here, so 0) |
| 36 | + # In real scenarios, employment_income flows to il_hbwd_gross_earned_income |
| 37 | + il_hbwd_countable_earned_income: 0 |
| 38 | + |
| 39 | +# Test 3: Scenario 15 - Married couple over income limit correctly shows ineligible |
| 40 | +# person1: Age 49, disabled, $4,500/month wages ($54,000/year) |
| 41 | +# person2: Age 47, NOT disabled/blind, $2,500/month wages ($30,000/year) |
| 42 | +# Combined gross income: $7,000/month |
| 43 | +# 350% FPL for 2 people = $6,168.75/month |
| 44 | +- name: Case 3, married couple over income limit correctly shows ineligible. |
| 45 | + period: 2025-01 |
| 46 | + absolute_error_margin: 0.3 |
| 47 | + input: |
| 48 | + people: |
| 49 | + person1: |
| 50 | + age: 49 |
| 51 | + is_disabled: true |
| 52 | + employment_income: 54_000 # $4,500/month * 12 |
| 53 | + person2: |
| 54 | + age: 47 |
| 55 | + is_disabled: false |
| 56 | + employment_income: 30_000 # $2,500/month * 12 |
| 57 | + spm_units: |
| 58 | + spm_unit: |
| 59 | + members: [person1, person2] |
| 60 | + households: |
| 61 | + household: |
| 62 | + members: [person1, person2] |
| 63 | + state_code: IL |
| 64 | + output: |
| 65 | + # person1 (disabled): gets exemptions |
| 66 | + # person2 (not disabled/blind): uses gross income (no exemptions) |
| 67 | + # Combined countable $6,323 > limit $6,168.75 → NOT eligible |
| 68 | + il_hbwd_countable_income: 6_323 |
| 69 | + il_hbwd_income_eligible: [false, false] |
| 70 | + il_hbwd_eligible: [false, false] |
| 71 | + il_hbwd_person: [0, 0] |
| 72 | + |
| 73 | +# Test 4: Single disabled worker - eligible |
| 74 | +- name: Case 4, single disabled worker eligible. |
| 75 | + period: 2025-01 |
| 76 | + absolute_error_margin: 0.3 |
| 77 | + input: |
| 78 | + people: |
| 79 | + person1: |
| 80 | + age: 35 |
| 81 | + is_disabled: true |
| 82 | + employment_income: 24_000 # $2,000/month * 12 |
| 83 | + spm_units: |
| 84 | + spm_unit: |
| 85 | + members: [person1] |
| 86 | + households: |
| 87 | + household: |
| 88 | + members: [person1] |
| 89 | + state_code: IL |
| 90 | + output: |
| 91 | + # Single person: 350% FPL = $5,285/month (2025) |
| 92 | + # Countable income after exemptions < limit → eligible |
| 93 | + il_hbwd_income_eligible: [true] |
| 94 | + il_hbwd_eligible: [true] |
| 95 | + |
| 96 | +# Test 5: Single disabled worker - over income limit |
| 97 | +- name: Case 5, single disabled worker over income limit. |
| 98 | + period: 2025-01 |
| 99 | + absolute_error_margin: 0.3 |
| 100 | + input: |
| 101 | + people: |
| 102 | + person1: |
| 103 | + age: 40 |
| 104 | + is_disabled: true |
| 105 | + employment_income: 72_000 # $6,000/month * 12 |
| 106 | + spm_units: |
| 107 | + spm_unit: |
| 108 | + members: [person1] |
| 109 | + households: |
| 110 | + household: |
| 111 | + members: [person1] |
| 112 | + state_code: IL |
| 113 | + output: |
| 114 | + # Single person: 350% FPL = $5,285/month |
| 115 | + # Countable income > limit → NOT eligible |
| 116 | + il_hbwd_income_eligible: [false] |
| 117 | + il_hbwd_eligible: [false] |
| 118 | + |
| 119 | +# Test 6: Blind worker (not disabled) - gets blind exemptions |
| 120 | +- name: Case 6, blind worker gets exemptions. |
| 121 | + period: 2025-01 |
| 122 | + absolute_error_margin: 0.3 |
| 123 | + input: |
| 124 | + people: |
| 125 | + person1: |
| 126 | + age: 45 |
| 127 | + is_disabled: false |
| 128 | + is_blind: true |
| 129 | + employment_income: 36_000 # $3,000/month * 12 |
| 130 | + spm_units: |
| 131 | + spm_unit: |
| 132 | + members: [person1] |
| 133 | + households: |
| 134 | + household: |
| 135 | + members: [person1] |
| 136 | + state_code: IL |
| 137 | + output: |
| 138 | + # Blind worker is disability eligible and gets more generous exemptions |
| 139 | + il_hbwd_disability_eligible: [true] |
| 140 | + il_hbwd_income_eligible: [true] |
| 141 | + il_hbwd_eligible: [true] |
| 142 | + |
| 143 | +# Test 7: Married couple - both disabled - both get exemptions |
| 144 | +- name: Case 7, married couple both disabled. |
| 145 | + period: 2025-01 |
| 146 | + absolute_error_margin: 0.3 |
| 147 | + input: |
| 148 | + people: |
| 149 | + person1: |
| 150 | + age: 50 |
| 151 | + is_disabled: true |
| 152 | + employment_income: 36_000 # $3,000/month * 12 |
| 153 | + person2: |
| 154 | + age: 48 |
| 155 | + is_disabled: true |
| 156 | + employment_income: 24_000 # $2,000/month * 12 |
| 157 | + spm_units: |
| 158 | + spm_unit: |
| 159 | + members: [person1, person2] |
| 160 | + households: |
| 161 | + household: |
| 162 | + members: [person1, person2] |
| 163 | + state_code: IL |
| 164 | + output: |
| 165 | + # Both disabled, both get exemptions |
| 166 | + # Combined gross $5,000/month, after exemptions < limit |
| 167 | + il_hbwd_income_eligible: [true, true] |
| 168 | + il_hbwd_eligible: [true, true] |
| 169 | + |
| 170 | +# Test 8: Disabled worker under age 16 - not age eligible |
| 171 | +- name: Case 8, disabled worker under age 16. |
| 172 | + period: 2025-01 |
| 173 | + absolute_error_margin: 0.3 |
| 174 | + input: |
| 175 | + people: |
| 176 | + person1: |
| 177 | + age: 15 |
| 178 | + is_disabled: true |
| 179 | + employment_income: 12_000 # $1,000/month * 12 |
| 180 | + spm_units: |
| 181 | + spm_unit: |
| 182 | + members: [person1] |
| 183 | + households: |
| 184 | + household: |
| 185 | + members: [person1] |
| 186 | + state_code: IL |
| 187 | + output: |
| 188 | + # Under 16 - not age eligible for HBWD |
| 189 | + il_hbwd_age_eligible: [false] |
| 190 | + il_hbwd_eligible: [false] |
| 191 | + |
| 192 | +# Test 9: Disabled worker over age 64 - not age eligible |
| 193 | +- name: Case 9, disabled worker over age 64. |
| 194 | + period: 2025-01 |
| 195 | + absolute_error_margin: 0.3 |
| 196 | + input: |
| 197 | + people: |
| 198 | + person1: |
| 199 | + age: 65 |
| 200 | + is_disabled: true |
| 201 | + employment_income: 24_000 # $2,000/month * 12 |
| 202 | + spm_units: |
| 203 | + spm_unit: |
| 204 | + members: [person1] |
| 205 | + households: |
| 206 | + household: |
| 207 | + members: [person1] |
| 208 | + state_code: IL |
| 209 | + output: |
| 210 | + # Over 64 - not age eligible for HBWD |
| 211 | + il_hbwd_age_eligible: [false] |
| 212 | + il_hbwd_eligible: [false] |
| 213 | + |
| 214 | +# Test 10: Family with disabled parent and children |
| 215 | +- name: Case 10, disabled parent with two children. |
| 216 | + period: 2025-01 |
| 217 | + absolute_error_margin: 0.3 |
| 218 | + input: |
| 219 | + people: |
| 220 | + person1: |
| 221 | + age: 38 |
| 222 | + is_disabled: true |
| 223 | + employment_income: 48_000 # $4,000/month * 12 |
| 224 | + person2: |
| 225 | + age: 12 |
| 226 | + is_disabled: false |
| 227 | + person3: |
| 228 | + age: 8 |
| 229 | + is_disabled: false |
| 230 | + spm_units: |
| 231 | + spm_unit: |
| 232 | + members: [person1, person2, person3] |
| 233 | + households: |
| 234 | + household: |
| 235 | + members: [person1, person2, person3] |
| 236 | + state_code: IL |
| 237 | + output: |
| 238 | + # 3-person household: 350% FPL = $7,455/month |
| 239 | + # Only person1 (disabled parent) can be HBWD eligible |
| 240 | + # Children not disabled, not age eligible |
| 241 | + il_hbwd_eligible: [true, false, false] |
| 242 | + |
| 243 | +# Test 11: Non-disabled, non-blind worker - not eligible |
| 244 | +- name: Case 11, non-disabled worker not eligible. |
| 245 | + period: 2025-01 |
| 246 | + absolute_error_margin: 0.3 |
| 247 | + input: |
| 248 | + people: |
| 249 | + person1: |
| 250 | + age: 30 |
| 251 | + is_disabled: false |
| 252 | + is_blind: false |
| 253 | + employment_income: 24_000 # $2,000/month * 12 |
| 254 | + spm_units: |
| 255 | + spm_unit: |
| 256 | + members: [person1] |
| 257 | + households: |
| 258 | + household: |
| 259 | + members: [person1] |
| 260 | + state_code: IL |
| 261 | + output: |
| 262 | + # Not disabled or blind - not disability eligible |
| 263 | + il_hbwd_disability_eligible: [false] |
| 264 | + il_hbwd_eligible: [false] |
| 265 | + |
| 266 | +# Test 12: Married couple at income threshold |
| 267 | +- name: Case 12, married couple at income threshold. |
| 268 | + period: 2025-01 |
| 269 | + absolute_error_margin: 0.3 |
| 270 | + input: |
| 271 | + people: |
| 272 | + person1: |
| 273 | + age: 55 |
| 274 | + is_disabled: true |
| 275 | + employment_income: 48_000 # $4,000/month * 12 |
| 276 | + person2: |
| 277 | + age: 52 |
| 278 | + is_disabled: false |
| 279 | + employment_income: 24_000 # $2,000/month * 12 |
| 280 | + spm_units: |
| 281 | + spm_unit: |
| 282 | + members: [person1, person2] |
| 283 | + households: |
| 284 | + household: |
| 285 | + members: [person1, person2] |
| 286 | + state_code: IL |
| 287 | + output: |
| 288 | + # Combined gross $6,000/month |
| 289 | + # person1 (disabled) gets exemptions, person2 (not disabled/blind) uses gross |
| 290 | + # Combined countable should be just under limit |
| 291 | + il_hbwd_income_eligible: [true, true] |
| 292 | + il_hbwd_eligible: [true, false] # person2 not disabled/blind |
0 commit comments