Skip to content

Commit

Permalink
Adjust test passing conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Apr 22, 2024
1 parent 94bbd04 commit 0ec8d1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_basic_flat_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def test_tc_variable_totals(variable):
if tc_variable_totals[variable] == 0:
# If the taxdata file has a zero total, we'll assume the PE file is still correct.
return
# 20% and more than 10bn off taxdata is a failure.
assert (
abs(total / tc_variable_totals[variable] - 1) < 0.5
abs(total / tc_variable_totals[variable] - 1) < 0.4
or abs(total / 1e9 - tc_variable_totals[variable] / 1e9) < 30
), f"{variable} ({name}) is off by {total / tc_variable_totals[variable] - 1:.1%} ({total/1e9:.1f}bn vs {tc_variable_totals[variable]/1e9:.1f}bn)"

0 comments on commit 0ec8d1c

Please sign in to comment.