[python-cherrypy2] Fixed hanging of test framework on failing tests

Martin Bacovsky mbacovsk at fedoraproject.org
Mon Aug 2 14:13:27 UTC 2010


commit 011406fa37a9d9982c71515c8b602b542a626f88
Author: Martin Bačovský <mbacovsk at redhat.com>
Date:   Mon Aug 2 16:11:13 2010 +0200

    Fixed hanging of test framework on failing tests

 python-cherrypy-2.3.0-py27_exceptions.patch |   34 +++++++++++++++++++++++++++
 python-cherrypy2.spec                       |    7 ++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/python-cherrypy-2.3.0-py27_exceptions.patch b/python-cherrypy-2.3.0-py27_exceptions.patch
new file mode 100644
index 0000000..38d07bf
--- /dev/null
+++ b/python-cherrypy-2.3.0-py27_exceptions.patch
@@ -0,0 +1,34 @@
+diff -up CherryPy-2.3.0/cherrypy/test/webtest.py.py27_exceptions CherryPy-2.3.0/cherrypy/test/webtest.py
+--- CherryPy-2.3.0/cherrypy/test/webtest.py.py27_exceptions	2010-08-02 14:27:29.000000000 +0200
++++ CherryPy-2.3.0/cherrypy/test/webtest.py	2010-08-02 14:34:04.000000000 +0200
+@@ -251,7 +251,7 @@ class WebCase(TestCase):
+                 except (KeyboardInterrupt, SystemExit):
+                     raise
+                 except:
+-                    result.addError(self, self._exc_info())
++                    result.addError(self, sys.exc_info())
+                     return
+                 
+                 ok = 0
+@@ -259,18 +259,18 @@ class WebCase(TestCase):
+                     testMethod()
+                     ok = 1
+                 except self.failureException:
+-                    result.addFailure(self, self._exc_info())
++                    result.addFailure(self, sys.exc_info())
+                 except (KeyboardInterrupt, SystemExit):
+                     raise
+                 except:
+-                    result.addError(self, self._exc_info())
++                    result.addError(self, sys.exc_info())
+                 
+                 try:
+                     self.tearDown()
+                 except (KeyboardInterrupt, SystemExit):
+                     raise
+                 except:
+-                    result.addError(self, self._exc_info())
++                    result.addError(self, sys.exc_info())
+                     ok = 0
+                 if ok:
+                     result.addSuccess(self)
diff --git a/python-cherrypy2.spec b/python-cherrypy2.spec
index b9fdf6c..f30d173 100644
--- a/python-cherrypy2.spec
+++ b/python-cherrypy2.spec
@@ -2,7 +2,7 @@
 
 Name:           python-cherrypy2
 Version:        2.3.0
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        A pythonic, object-oriented web development framework
 Group:          Development/Libraries
 License:        BSD
@@ -15,6 +15,7 @@ Patch1:         python-cherrypy-2.3.0-EINTR.patch
 Patch2:         python-cherrypy-2.3.0-py26-test.patch
 Patch3:         python-cherrypy-deprecation.patch
 Patch4:         python-cherrypy-2.3.0-broken_tests.patch
+Patch5:         python-cherrypy-2.3.0-py27_exceptions.patch
 
 BuildArch:      noarch
 
@@ -42,6 +43,7 @@ CherryPy.
 %patch2 -p1
 %patch3 -p1 -b .depr
 %patch4 -p1
+%patch5 -p1
 
 %{__sed} -i 's/\r//' CHANGELOG.txt README.txt CHERRYPYTEAM.txt cherrypy/tutorial/README.txt
 cp -p %{SOURCE1} .
@@ -69,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/*
 
 %changelog
+* Mon Aug 02 2010 Martin Bacovsky <mbacovsk at redhat.com> - 2.3.0-14
+- fixed hanging of test framework on failing tests (on python 2.7)
+
 * Fri Jul 30 2010 Martin Bacovsky <mbacovsk at redhat.com> - 2.3.0-13
 - fixed tests failing on python 2.7
 


More information about the scm-commits mailing list