Index: /trunk/anuga_core/source/anuga/caching/caching.py
===================================================================
--- /trunk/anuga_core/source/anuga/caching/caching.py	(revision 9488)
+++ /trunk/anuga_core/source/anuga/caching/caching.py	(revision 9489)
@@ -463,5 +463,5 @@
       set_option('compression', compression)
     except:
-      test_error('Set option failed')      
+      log_test_error('Set option failed')      
 
   try:
@@ -505,7 +505,7 @@
     Depfile.write('We are the knights who say NI!')
     Depfile.close()
-    test_OK('Wrote file %s' %DepFN)
+    log_test_OK('Wrote file %s' %DepFN)
   except:
-    test_error('Could not open file %s for writing - check your environment' \
+    log_test_error('Could not open file %s for writing - check your environment' \
                % DepFN)
 
@@ -515,7 +515,7 @@
     set_option('savestat',0)
     assert(options['savestat'] == 0)
-    test_OK('Set option')
+    log_test_OK('Set option')
   except:
-    test_error('Set option failed')    
+    log_test_error('Set option failed')    
     
   # Make some test input arguments
@@ -544,12 +544,12 @@
                    verbose=verbose, compression=comp)
       if comp:                   
-        test_OK('Caching evaluation with compression')
+        log_test_OK('Caching evaluation with compression')
       else:     
-        test_OK('Caching evaluation without compression')      
+        log_test_OK('Caching evaluation without compression')      
     except:
       if comp:
-        test_error('Caching evaluation with compression failed - try caching.test(compression=0)')
+        log_test_error('Caching evaluation with compression failed - try caching.test(compression=0)')
       else:
-        test_error('Caching evaluation failed - try caching.test(verbose=1)')
+        log_test_error('Caching evaluation failed - try caching.test(verbose=1)')
 
     # Retrieve
@@ -560,12 +560,12 @@
 
       if comp:                   
-        test_OK('Caching retrieval with compression')
+        log_test_OK('Caching retrieval with compression')
       else:     
-        test_OK('Caching retrieval without compression')      
+        log_test_OK('Caching retrieval without compression')      
     except:
       if comp:
-        test_error('Caching retrieval with compression failed - try caching.test(compression=0)')
+        log_test_error('Caching retrieval with compression failed - try caching.test(compression=0)')
       else:                                      
-        test_error('Caching retrieval failed - try caching.test(verbose=1)')
+        log_test_error('Caching retrieval failed - try caching.test(verbose=1)')
 
     # Reference result
@@ -575,9 +575,9 @@
     if T1 == T2 and T2 == T3:
       if comp:
-        test_OK('Basic caching functionality (with compression)')
+        log_test_OK('Basic caching functionality (with compression)')
       else:
-        test_OK('Basic caching functionality (without compression)')
+        log_test_OK('Basic caching functionality (without compression)')
     else:
-      test_error('Cached result does not match computed result')
+      log_test_error('Cached result does not match computed result')
 
 
@@ -588,7 +588,7 @@
                  return_filename=1)    
     assert(FN[:2] == 'f[')
-    test_OK('Return of cache filename')
+    log_test_OK('Return of cache filename')
   except:
-    test_error('Return of cache filename failed')
+    log_test_error('Return of cache filename failed')
 
   # Test existence of cachefiles
@@ -598,10 +598,10 @@
     (argsfile,compressed1) = myopen(CD+FN+'_'+file_types[1],"rb",compression)
     (admfile,compressed2) =  myopen(CD+FN+'_'+file_types[2],"rb",compression)
-    test_OK('Presence of cache files')
+    log_test_OK('Presence of cache files')
     datafile.close()
     argsfile.close()
     admfile.close()
   except:
-    test_error('Expected cache files did not exist') 
+    log_test_error('Expected cache files did not exist') 
               
   # Test 'test' function when cache is present
@@ -613,7 +613,7 @@
     assert(T1 == T4)
 
-    test_OK("Option 'test' when cache file present")
+    log_test_OK("Option 'test' when cache file present")
   except:
-    test_error("Option 'test' when cache file present failed")      
+    log_test_error("Option 'test' when cache file present failed")      
 
   # Test that 'clear' works
@@ -621,12 +621,12 @@
   #try:
   #  cache(f,'clear',verbose=verbose)
-  #  test_OK('Clearing of cache files')
+  #  log_test_OK('Clearing of cache files')
   #except:
-  #  test_error('Clear does not work')
+  #  log_test_error('Clear does not work')
   try:
     cache(f,(a,b,c,N), {'x':x, 'y':y}, verbose=verbose, clear=1)    
-    test_OK('Clearing of cache files')
+    log_test_OK('Clearing of cache files')
   except:
-    test_error('Clear does not work')  
+    log_test_error('Clear does not work')  
 
   
@@ -637,7 +637,7 @@
     T4 = cache(f,(a,b,c,N), {'x':x, 'y':y}, verbose=verbose, test=1)
     assert(T4 is None)
-    test_OK("Option 'test' when cache absent")
+    log_test_OK("Option 'test' when cache absent")
   except:
-    test_error("Option 'test' when cache absent failed")      
+    log_test_error("Option 'test' when cache absent failed")      
           
   # Test dependencies
@@ -649,7 +649,7 @@
                        
   if T1 == T2:
-    test_OK('Basic dependencies functionality')
+    log_test_OK('Basic dependencies functionality')
   else:
-    test_error('Dependencies do not work')
+    log_test_error('Dependencies do not work')
 
   # Test basic wildcard dependency
@@ -659,7 +659,7 @@
     
   if T1 == T3:
-    test_OK('Basic dependencies with wildcard functionality')
+    log_test_OK('Basic dependencies with wildcard functionality')
   else:
-    test_error('Dependencies with wildcards do not work')
+    log_test_error('Dependencies with wildcards do not work')
 
 
@@ -675,7 +675,7 @@
   
   if T3 is None:
-    test_OK('Changed dependencies recognised')
+    log_test_OK('Changed dependencies recognised')
   else:
-    test_error('Changed dependencies not recognised')    
+    log_test_error('Changed dependencies not recognised')    
   
   # Test recomputation when dependencies have changed
@@ -684,7 +684,7 @@
                dependencies=DepFN)                       
   if T1 == T3:
-    test_OK('Recomputed value with changed dependencies')
+    log_test_OK('Recomputed value with changed dependencies')
   else:
-    test_error('Recomputed value with changed dependencies failed')
+    log_test_error('Recomputed value with changed dependencies failed')
 
   # Performance test (with statistics)
@@ -705,8 +705,8 @@
   if T1 == T2:
     if t1 > t2:
-      test_OK('Performance test: relative time saved = %s pct' \
+      log_test_OK('Performance test: relative time saved = %s pct' \
               %str(round((t1-t2)*100/t1,2)))
   else:       
-    test_error('Basic caching failed for new problem')
+    log_test_error('Basic caching failed for new problem')
             
   # Test presence of statistics file
@@ -719,7 +719,7 @@
         fid = open(CD+FN,'r')
         fid.close()
-    test_OK('Statistics files present') 
+    log_test_OK('Statistics files present') 
   except:
-    test_OK('Statistics files cannot be opened')          
+    log_test_OK('Statistics files cannot be opened')          
       
   print_header_box('Show sample output of the caching function:')
@@ -741,5 +741,5 @@
                    'time.strptime() which is unavailable in Windows')
       
-  test_OK('Caching self test completed')    
+  log_test_OK('Caching self test completed')    
       
             
@@ -767,5 +767,5 @@
                             # arguments.
 textwidth3 = 16             # Initial width of separation lines. Is modified.
-textwidth4 = 50             # Text width in test_OK()
+textwidth4 = 50             # Text width in log_test_OK()
 statsfile  = '.cache_stat'  # Basefilename for cached statistics.
                             # It will reside in the chosen cache directory.
@@ -2495,9 +2495,9 @@
 # -----------------------------------------------------------------------------
 
-def test_OK(msg):
+def log_test_OK(msg):
   """Print OK msg if test is OK.
   
   USAGE
-    test_OK(message)
+    log_test_OK(message)
   """
 
@@ -2510,9 +2510,9 @@
 # -----------------------------------------------------------------------------
 
-def test_error(msg):
+def log_test_error(msg):
   """Print error if test fails.
   
   USAGE
-    test_error(message)
+    log_test_error(message)
   """
   
