We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49f10a3 commit 0cbbfb8Copy full SHA for 0cbbfb8
policyengine_us_data/tests/test_datasets/test_enhanced_cps.py
@@ -72,8 +72,9 @@ def apply(self):
72
73
# Calculate tax expenditure
74
tax_expenditure = (income_tax_r - income_tax_b).sum()
75
+ pct_error = abs((tax_expenditure - target) / target)
76
+ TOLERANCE = 0.15
77
- # Assert within 5bn of target
78
assert (
- abs(tax_expenditure - target) < 5e9
79
- ), f"{deduction} tax expenditure {tax_expenditure/1e9:.1f}bn differs from target {target/1e9:.1f}bn by more than 5bn"
+ pct_error < TOLERANCE
80
+ ), f"{deduction} tax expenditure {tax_expenditure/1e9:.1f}bn differs from target {target/1e9:.1f}bn by {pct_error:.2%}"
0 commit comments