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