subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1827008 - in /subversion/trunk/subversion/tests/cmdline: svnauthz_tests.py svnversion_tests.py
Date Fri, 16 Mar 2018 16:27:42 GMT
Author: julianfoad
Date: Fri Mar 16 16:27:42 2018
New Revision: 1827008

URL: http://svn.apache.org/viewvc?rev=1827008&view=rev
Log:
Update a very old test suite idiom.

* subversion/tests/cmdline/svnauthz_tests.py
  (svnauthz_validate_txn_test,
   svnauthz_accessof_repo_test): Testing the return value of
    run_and_verify functions is no longer needed, as they raise an
    exception on failure.

* subversion/tests/cmdline/svnversion_tests.py
  (svnversion_test): Same.

Modified:
    subversion/trunk/subversion/tests/cmdline/svnauthz_tests.py
    subversion/trunk/subversion/tests/cmdline/svnversion_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/svnauthz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnauthz_tests.py?rev=1827008&r1=1827007&r2=1827008&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnauthz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnauthz_tests.py Fri Mar 16 16:27:42 2018
@@ -197,9 +197,8 @@ def svnauthz_validate_txn_test(sbox):
   svntest.main.create_python_hook_script(pre_commit_hook, hook_instance)
   svntest.main.file_append(authz_path, 'x')
   expected_status.tweak('A/authz', status='  ', wc_rev=4)
-  if svntest.actions.run_and_verify_commit(wc_dir, expected_output,
-                                           expected_status):
-    raise svntest.Failure
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status)
   expected_data = svntest.verify.ExpectedOutput("Exit 2\n", match_all=False)
   verify_logfile(logfilepath, expected_data)
 
@@ -275,9 +274,8 @@ def svnauthz_accessof_repo_test(sbox):
   expected_status.add({
     'A/authz'            :  Item(status='  ', wc_rev=2),
   })
-  if svntest.actions.run_and_verify_commit(wc_dir, expected_output,
-                                           expected_status):
-    raise svntest.Failure
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status)
 
   # Anonymous access with no path, and no repository should be rw
   # since it returns the highest level of access granted anywhere.

Modified: subversion/trunk/subversion/tests/cmdline/svnversion_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnversion_tests.py?rev=1827008&r1=1827007&r2=1827008&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnversion_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnversion_tests.py Fri Mar 16 16:27:42 2018
@@ -71,9 +71,8 @@ def svnversion_test(sbox):
   expected_output = wc.State(wc_dir, {'A/mu' : Item(verb='Sending')})
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('A/mu', wc_rev=2)
-  if svntest.actions.run_and_verify_commit(wc_dir,
-                                           expected_output, expected_status):
-    raise svntest.Failure
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output, expected_status)
 
   # Unmodified, mixed
   svntest.actions.run_and_verify_svnversion(wc_dir, repo_url,
@@ -98,13 +97,12 @@ def svnversion_test(sbox):
                       + 'appended mu text')
   expected_disk.tweak('iota',
                       contents=expected_disk.desc['A/D/gamma'].contents)
-  if svntest.actions.run_and_verify_switch(wc_dir, iota_path, gamma_url,
-                                           expected_output,
-                                           expected_disk,
-                                           expected_status,
-                                           [],
-                                           False, '--ignore-ancestry'):
-    raise svntest.Failure
+  svntest.actions.run_and_verify_switch(wc_dir, iota_path, gamma_url,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        [],
+                                        False, '--ignore-ancestry')
 
   # Prop modified, mixed, part wc switched
   svntest.actions.run_and_verify_svnversion(wc_dir, repo_url,



Mime
View raw message