Author: hwright
Date: Wed Apr  4 15:23:43 2012
New Revision: 1309452

URL: http://svn.apache.org/viewvc?rev=1309452&view=rev
Log:
Use the logging infrastructure in the copy tests.

* subversion/tests/cmdline/copy_tests.py
  (logger): New.
  (copy_preserve_executable_bit, repos_to_wc, revision_kinds_local_source,
   url_to_non_existent_url_path): Use logger.warn() in place of print().

Modified:
    subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1309452&r1=1309451&r2=1309452&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Wed Apr  4 15:23:43 
2012
@@ -25,7 +25,9 @@
 ######################################################################
 
 # General modules
-import stat, os, re, shutil
+import stat, os, re, shutil, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -812,7 +814,7 @@ def copy_preserve_executable_bit(sbox):
   mode2 = os.stat(newpath1)[stat.ST_MODE]
 
   if mode1 == mode2:
-    print("setting svn:executable did not change file's permissions")
+    logger.warn("setting svn:executable did not change file's permissions")
     raise svntest.Failure
 
   # Commit the file
@@ -827,7 +829,7 @@ def copy_preserve_executable_bit(sbox):
 
   # The mode on the original and copied file should be identical
   if mode2 != mode3:
-    print("permissions on the copied file are not identical to original file")
+    logger.warn("permissions on the copied file are not identical to original 
file")
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -942,13 +944,13 @@ def repos_to_wc(sbox):
   # Modification will only show up if timestamps differ
   exit_code, out, err = svntest.main.run_svn(None, 'diff', pi_path)
   if err or not out:
-    print("diff failed")
+    logger.warn("diff failed")
     raise svntest.Failure
   for line in out:
     if line == '+zig\n': # Crude check for diff-like output
       break
   else:
-    print("diff output incorrect %s" % out)
+    logger.warn("diff output incorrect %s" % out)
     raise svntest.Failure
 
   # Revert everything and verify.
@@ -1367,7 +1369,7 @@ def revision_kinds_local_source(sbox):
       if line.rstrip() == "Copied From Rev: " + str(from_rev):
         break
     else:
-      print("%s should have been copied from revision %s" % (dst, from_rev))
+      logger.warn("%s should have been copied from revision %s" % (dst, 
from_rev))
       raise svntest.Failure
 
   # Check that the new files have the right contents
@@ -1625,7 +1627,7 @@ def url_to_non_existent_url_path(sbox):
     if re.match (msg, err_line):
       break
   else:
-    print("message \"%s\" not found in error output: %s" % (msg, err))
+    logger.warn("message \"%s\" not found in error output: %s" % (msg, err))
     raise svntest.Failure
 
 


Reply via email to