Permalink
Browse files

Changed dir names and other tweaks to chardiff and imagediff

  • Loading branch information...
rjleveque committed Jan 31, 2012
1 parent e02da85 commit 0b489b23cfc37ab80458782f5bb587bc0243e1f8
Showing with 5 additions and 4 deletions.
  1. +4 −3 src/python/clawutil/chardiff.py
  2. +1 −1 src/python/clawutil/imagediff.py
@@ -189,15 +189,15 @@ def chardiff_file(fname1, fname2, print_all_lines=True, hfile1='', \
# -----------------------------------------------------------------
-def chardiff_dir(dir1, dir2, file_pattern='all', dir3="diff_dir",
+def chardiff_dir(dir1, dir2, file_pattern='all', dir3="_char_diff",
overwrite=False, print_all_lines=True, verbose=False):
"""
Run chardiff_file on all common files between dir1 and dir2 that match the patterns in the
list files.
"""
import filecmp, glob
- ignored_extensions = ['.o','.pdf','.ps','']
+ ignored_extensions = ['.o','.pdf','.ps','.chk','']
# Construct sorted list of files matching in either or both directories:
if file_pattern=='all':
@@ -248,11 +248,12 @@ def chardiff_dir(dir1, dir2, file_pattern='all', dir3="diff_dir",
f_equal, f_diff, f_other = filecmp.cmpfiles(dir1,dir2,files,False)
for f in files:
+ print "Checking ",f
if (f=='.'):
continue
hfile.write("<li> <b>%s:</b> &nbsp; " % f)
exten = os.path.splitext(f)[1]
- if (exten in ignored_extensions):
+ if (exten[:4] in ignored_extensions):
hfile.write("Ignoring files with exension '%s'\n" % exten)
elif f not in files2:
hfile.write("Only appears in dir1\n")
@@ -58,7 +58,7 @@ def make_imagediff(fname1,fname2,fname3='', verbose=True):
return fname3
-def imagediff_dir(dir1, dir2, dir3="imagediff_dir", ext='.png', overwrite=False, verbose=True):
+def imagediff_dir(dir1, dir2, dir3="_image_diff", ext='.png', overwrite=False, verbose=True):
import filecmp,glob

0 comments on commit 0b489b2

Please sign in to comment.