本文整理匯總了Python中taxcalc.IncomeTaxIO.tax_year方法的典型用法代碼示例。如果您正苦於以下問題:Python IncomeTaxIO.tax_year方法的具體用法?Python IncomeTaxIO.tax_year怎麽用?Python IncomeTaxIO.tax_year使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類taxcalc.IncomeTaxIO
的用法示例。
在下文中一共展示了IncomeTaxIO.tax_year方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_1
# 需要導入模塊: from taxcalc import IncomeTaxIO [as 別名]
# 或者: from taxcalc.IncomeTaxIO import tax_year [as 別名]
def test_1():
"""
Test IncomeTaxIO constructor with no policy reform.
"""
taxyear = 2020
inctax = IncomeTaxIO(input_filename=FAUX_PUF_CSV,
tax_year=taxyear,
reform_filename=None,
blowup_input_data=False)
assert inctax.tax_year() == taxyear
示例2: test_1
# 需要導入模塊: from taxcalc import IncomeTaxIO [as 別名]
# 或者: from taxcalc.IncomeTaxIO import tax_year [as 別名]
def test_1(rawinputfile): # pylint: disable=redefined-outer-name
"""
Test IncomeTaxIO constructor with no policy reform and no blowup.
"""
IncomeTaxIO.show_iovar_definitions()
taxyear = 2021
inctax = IncomeTaxIO(input_data=rawinputfile.name,
tax_year=taxyear,
policy_reform=None,
blowup_input_data=False)
assert inctax.tax_year() == taxyear
示例3: test_2
# 需要導入模塊: from taxcalc import IncomeTaxIO [as 別名]
# 或者: from taxcalc.IncomeTaxIO import tax_year [as 別名]
def test_2():
"""
Test IncomeTaxIO calculate method with no output writing.
"""
taxyear = 2020
inctax = IncomeTaxIO(input_filename=FAUX_PUF_CSV,
tax_year=taxyear,
reform_filename=None,
blowup_input_data=False)
inctax.calculate(write_output_file=False)
assert inctax.tax_year() == taxyear
示例4: test_5
# 需要導入模塊: from taxcalc import IncomeTaxIO [as 別名]
# 或者: from taxcalc.IncomeTaxIO import tax_year [as 別名]
def test_5(rawinputfile): # pylint: disable=redefined-outer-name
"""
Test IncomeTaxIO calculate method with no output writing and no blowup and
no reform, using the output_records option.
"""
taxyear = 2021
inctax = IncomeTaxIO(input_data=rawinputfile.name,
tax_year=taxyear,
policy_reform=None,
blowup_input_data=False,
output_records=True)
inctax.output_records(writing_output_file=False)
assert inctax.tax_year() == taxyear
示例5: test_creation_with_blowup
# 需要導入模塊: from taxcalc import IncomeTaxIO [as 別名]
# 或者: from taxcalc.IncomeTaxIO import tax_year [as 別名]
def test_creation_with_blowup(rawinputfile, blowup, weights_out):
"""
Test IncomeTaxIO instantiation with no policy reform and with blowup.
"""
# for fixture args, pylint: disable=redefined-outer-name
IncomeTaxIO.show_iovar_definitions()
taxyear = 2021
inctax = IncomeTaxIO(input_data=rawinputfile.name,
tax_year=taxyear,
policy_reform=None,
exact_calculations=False,
blowup_input_data=blowup,
output_weights=weights_out,
output_records=False,
csv_dump=False)
assert inctax.tax_year() == taxyear