diff --git a/taxcalc/tests/test_compatible_data.py b/taxcalc/tests/test_compatible_data.py index bb4f3098e..dcbb1c605 100644 --- a/taxcalc/tests/test_compatible_data.py +++ b/taxcalc/tests/test_compatible_data.py @@ -142,7 +142,7 @@ def fixture_sorted_param_names(allparams): @pytest.fixture(scope='module', name='allparams_batch', - params=[i for i in range(0, BATCHES)]) + params=list(range(0, BATCHES))) def fixture_allparams_batch(request, allparams, sorted_param_names): """ Fixture for grouping Tax-Calculator parameters diff --git a/taxcalc/tests/test_reforms.py b/taxcalc/tests/test_reforms.py index 606c43ad4..b10db9457 100644 --- a/taxcalc/tests/test_reforms.py +++ b/taxcalc/tests/test_reforms.py @@ -11,8 +11,7 @@ import pytest import numpy as np import pandas as pd -# pylint: disable=import-error -from taxcalc import Calculator, Policy, Records +from taxcalc import Calculator, Policy, Records # pylint: disable=import-error def test_2017_law_reform(tests_path): @@ -342,7 +341,7 @@ def fixture_reforms_dict(tests_path): @pytest.mark.requires_pufcsv -@pytest.mark.parametrize('rid', [i for i in range(1, NUM_REFORMS + 1)]) +@pytest.mark.parametrize('rid', list(range(1, NUM_REFORMS + 1))) def test_reforms(rid, test_reforms_init, tests_path, baseline_2017_law, reforms_dict, puf_subsample): """ diff --git a/taxcalc/tests/test_taxcalcio.py b/taxcalc/tests/test_taxcalcio.py index 821ecd77b..7107209f4 100644 --- a/taxcalc/tests/test_taxcalcio.py +++ b/taxcalc/tests/test_taxcalcio.py @@ -533,7 +533,7 @@ def test_no_tables_or_graphs(reformfile1): # create input sample that cannot output tables or graphs nobs = 10 idict = {} - idict['RECID'] = [i for i in range(1, nobs + 1)] + idict['RECID'] = list(range(1, nobs + 1)) idict['MARS'] = [2 for i in range(1, nobs + 1)] idict['s006'] = [0.0 for i in range(1, nobs + 1)] idict['e00300'] = [10000 * i for i in range(1, nobs + 1)] @@ -581,7 +581,7 @@ def test_tables(reformfile1): # create tabable input nobs = 100 idict = {} - idict['RECID'] = [i for i in range(1, nobs + 1)] + idict['RECID'] = list(range(1, nobs + 1)) idict['MARS'] = [2 for i in range(1, nobs + 1)] idict['s006'] = [10.0 for i in range(1, nobs + 1)] idict['e00300'] = [10000 * i for i in range(1, nobs + 1)] @@ -618,7 +618,7 @@ def test_graphs(reformfile1): # create graphable input nobs = 100 idict = {} - idict['RECID'] = [i for i in range(1, nobs + 1)] + idict['RECID'] = list(range(1, nobs + 1)) idict['MARS'] = [2 for i in range(1, nobs + 1)] idict['XTOT'] = [3 for i in range(1, nobs + 1)] idict['s006'] = [10.0 for i in range(1, nobs + 1)]