Skip to content

Commit

Permalink
Fix pylint R0133 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jan 4, 2025
1 parent 08a20f3 commit 2bfee11
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion taxcalc/tests/test_4package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_for_package_existence():
out = subprocess.check_output(['conda', 'list', 'taxcalc']).decode('ascii')
envless_out = out.replace('taxcalc-dev', 'environment')
if re.search('taxcalc', envless_out) is not None:
assert 'taxcalc package' == 'installed'
assert False, 'ERROR: taxcalc package is installed'


def test_for_consistency(tests_path):
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/tests/test_calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_EI_PayrollTax(test_input, expected_output, skip_jit):
print('*INPUT:', test_input)
print('ACTUAL:', actual_output)
print('EXPECT:', expected_output)
assert 1 == 2, 'ACTUAL != EXPECT'
assert False, 'ERROR: ACTUAL != EXPECT'


def test_AfterTaxIncome(skip_jit):
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/tests/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def test_reform_documentation():
dump = False # set to True to print documentation and force test failure
if dump:
print(doc)
assert 1 == 2
assert False, 'ERROR: reform_documentation above'


def test_distribution_tables(cps_subsample):
Expand Down
4 changes: 2 additions & 2 deletions taxcalc/tests/test_compatible_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def valid_compatible_data(compatible_data):
msg = '{} has no or invalid compatible_data field'
for pname in problem_pnames:
print(msg.format(pname))
assert 'list of problem_pnames' == 'empty list'
assert False, 'ERROR: list of problem_pnames is above'


XX_YEAR = 2019
Expand Down Expand Up @@ -337,4 +337,4 @@ def test_compatible_data(cps_subsample, puf_subsample,
# test failure if any errors
if errors:
print(errors)
assert 'compatible_data' == 'invalid'
assert False, 'ERROR: compatible_data is invalid; see errors above'
8 changes: 4 additions & 4 deletions taxcalc/tests/test_taxcalcio.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def test_output_options(reformfile1, assumpfile1):
os.remove(outfilepath)
except OSError:
pass # sometimes we can't remove a generated temporary file
assert 'TaxCalcIO.analyze(minimal_output)_ok' == 'no'
assert False, 'TaxCalcIO.analyze(minimal_output) failed'
# --dump output with full dump
try:
tcio.analyze(writing_output_file=True, output_dump=True)
Expand All @@ -442,7 +442,7 @@ def test_output_options(reformfile1, assumpfile1):
os.remove(outfilepath)
except OSError:
pass # sometimes we can't remove a generated temporary file
assert 'TaxCalcIO.analyze(full_dump_output)_ok' == 'no'
assert False, 'TaxCalcIO.analyze(full_dump_output) failed'
# --dump output with partial dump
try:
tcio.analyze(writing_output_file=True,
Expand All @@ -454,7 +454,7 @@ def test_output_options(reformfile1, assumpfile1):
os.remove(outfilepath)
except OSError:
pass # sometimes we can't remove a generated temporary file
assert 'TaxCalcIO.analyze(partial_dump_output)_ok' == 'no'
assert False, 'TaxCalcIO.analyze(partial_dump_output) failed'
# if tries were successful, remove doc file and output file
docfilepath = outfilepath.replace('.csv', '-doc.text')
if os.path.isfile(docfilepath):
Expand Down Expand Up @@ -520,7 +520,7 @@ def test_sqldb_option(reformfile1, assumpfile1):
os.remove(dbfilepath)
except OSError:
pass # sometimes we can't remove a generated temporary file
assert 'TaxCalcIO.analyze(sqldb)_ok' == 'no'
assert False, 'ERROR: TaxCalcIO.analyze(sqldb) failed'
# if try was successful, remove the db file
if os.path.isfile(dbfilepath):
os.remove(dbfilepath)
Expand Down
4 changes: 2 additions & 2 deletions taxcalc/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def test_create_tables(cps_subsample):
print('{:.1f},'.format(val))

if test_failure:
assert 1 == 2
assert False, 'ERROR: test failure'


def test_diff_count_precision():
Expand Down Expand Up @@ -702,7 +702,7 @@ def test_write_graph_file(cps_subsample):
os.remove(htmlfname)
except OSError:
pass # sometimes we can't remove a generated temporary file
assert 'write_graph_file()_ok' == 'no'
assert False, 'ERROR: write_graph_file() failed'
# if try was successful, try to remove the file
if os.path.isfile(htmlfname):
try:
Expand Down

0 comments on commit 2bfee11

Please sign in to comment.