Changes in tests/pybin/tools.py [575a6e5:202ad72]
- File:
-
- 1 edited
-
tests/pybin/tools.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/tools.py
r575a6e5 r202ad72 36 36 37 37 def is_ascii(fname): 38 if settings.dry_run: 39 print("is_ascii: %s" % fname) 40 return True 41 38 42 if not os.path.isfile(fname): 39 43 return False … … 75 79 def diff( lhs, rhs ): 76 80 # diff the output of the files 77 diff_cmd = ("diff --ignore-all-space "81 diff_cmd = ("diff --ignore-all-space --text " 78 82 "--ignore-blank-lines " 79 83 "--old-group-format='\t\tmissing lines :\n" … … 132 136 # helper function to replace patterns in a file 133 137 def file_replace(fname, pat, s_after): 138 if settings.dry_run: 139 print("replacing '%s' with '%s' in %s" % (pat, s_after, fname)) 140 return 141 134 142 file = fileinput.FileInput(fname, inplace=True, backup='.bak') 135 143 for line in file:
Note:
See TracChangeset
for help on using the changeset viewer.