2727import os
2828import difflib
2929import configparser
30- import shutil
3130import shlex
3231from datetime import datetime
3332import fprettify
@@ -99,12 +98,12 @@ def tearDownClass(cls):
9998 output.
10099 """
101100 if cls .n_parsefail + cls .n_internalfail > 0 :
102- format = "{:<20}{:<6}"
101+ format_str = "{:<20}{:<6}"
103102 FprettifyIntegrationTestCase .eprint ('\n ' + "=" * 70 )
104103 FprettifyIntegrationTestCase .eprint ("IGNORED errors: invalid or old Fortran" )
105104 FprettifyIntegrationTestCase .eprint ("-" * 70 )
106- FprettifyIntegrationTestCase .eprint (format .format ("parse errors: " , cls .n_parsefail ))
107- FprettifyIntegrationTestCase .eprint (format .format ("internal errors: " , cls .n_internalfail ))
105+ FprettifyIntegrationTestCase .eprint (format_str .format ("parse errors: " , cls .n_parsefail ))
106+ FprettifyIntegrationTestCase .eprint (format_str .format ("internal errors: " , cls .n_internalfail ))
108107
109108 @staticmethod
110109 def write_result (filename , content , sep_str ): # pragma: no cover
@@ -154,7 +153,7 @@ def generate_suite(suite=None, name=None):
154153 finally :
155154 os .chdir (orig )
156155
157- addtestcode (code ['path' ], code ['options' ])
156+ add_test_code (code ['path' ], code ['options' ])
158157 return FprettifyIntegrationTestCase
159158
160159def normalize_line (line ):
@@ -167,7 +166,7 @@ def normalize_line(line):
167166 line_out = re .sub ("^&" , '' , line_out , flags = re .MULTILINE )
168167 return line_out
169168
170- def addtestcode (code_path , options ):
169+ def add_test_code (code_path , options ):
171170 print (f"creating test cases from { code_path } ..." )
172171 # dynamically create test cases from fortran files in test directory
173172
@@ -190,9 +189,9 @@ def addtestcode(code_path, options):
190189 break
191190
192191 if include_file :
193- addtestmethod (FprettifyIntegrationTestCase , rel_dirpath , example , fprettify_args )
192+ add_test_method (FprettifyIntegrationTestCase , rel_dirpath , example , fprettify_args )
194193
195- def addtestmethod (testcase , fpath , ffile , args ):
194+ def add_test_method (testcase , fpath , ffile , args ):
196195 """add a test method for each example."""
197196
198197 def testmethod (testcase ):
0 commit comments