rpms/python-daemon/EL-5 python-daemon-1.5.2-py24-exc.patch, NONE, 1.1 python-daemon.spec, 1.5, 1.6

Luke Macken lmacken at fedoraproject.org
Sat Jan 9 07:28:50 UTC 2010


Author: lmacken

Update of /cvs/pkgs/rpms/python-daemon/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12688

Modified Files:
	python-daemon.spec 
Added Files:
	python-daemon-1.5.2-py24-exc.patch 
Log Message:
* Fri Jan 08 2010 Luke Macken <lmacken at redhat.com> - 1.5.2-3
- Add python-daemon-1.5.2-py24-exc.patch to fix a few
  unit tests on python 2.4



python-daemon-1.5.2-py24-exc.patch:
 test_pidlockfile.py |    2 +-
 test_runner.py      |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- NEW FILE python-daemon-1.5.2-py24-exc.patch ---
--- test/test_runner.py.orig	2010-01-08 20:41:22.000000000 -0500
+++ test/test_runner.py	2010-01-08 20:44:32.000000000 -0500
@@ -485,7 +485,7 @@
         else:
             raise self.failureException(
                 "Failed to raise " + expect_error.__name__)
-        self.failUnlessIn(exc.message, expect_message_content)
+        self.failUnlessIn(str(exc), expect_message_content)
 
     def test_breaks_lock_if_no_such_process(self):
         """ Should request breaking lock if PID file process is not running. """
@@ -580,7 +580,7 @@
             raise self.failureException(
                 "Failed to raise " + expect_error.__name__)
         scaffold.mock_restore()
-        self.failUnlessIn(exc.message, expect_message_content)
+        self.failUnlessIn(str(exc), expect_message_content)
 
     def test_breaks_lock_if_pidfile_stale(self):
         """ Should break lock if PID file is stale. """
@@ -629,7 +629,7 @@
             raise self.failureException(
                 "Failed to raise " + expect_error.__name__)
         scaffold.mock_restore()
-        self.failUnlessIn(exc.message, expect_message_content)
+        self.failUnlessIn(str(exc), expect_message_content)
 
 
 class DaemonRunner_do_action_restart_TestCase(scaffold.TestCase):
[?1049h[?1h=[?12;25h[?12l[?25h[?25l"cat" [New File]~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                  
                                             ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                             
  ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                                                              ~                                  
                                             ~                                                                              ~                                                                              ~                                                                              ~                                                                              0,0-1All[?12l[?25h[?25lType  :quit<Enter>  to exit Vim0,0-1All[?12l[?25h[?25l0,0-1All[?12l[?25h[?25l0,0-1All[?12l[?25h[?25l0,0-1All[?12l[?25h[?25l0,0-1All[?12l[?25h[?25l0,0-1All[?12l[?25h[?25l^Z
[?1l>[?12l[?25h[?1049l--- test/test_pidlockfile.py.orig	2010-01-08 21:57:48.000000000 -0500
+++ test/test_pidlockfile.py	2010-01-08 22:03:55.000000000 -0500
@@ -645,7 +645,7 @@
         mock_error = OSError(errno.EACCES, "Denied", pidfile_path)
         os.remove.mock_raises = mock_error
         self.failUnlessRaises(
-            type(mock_error),
+            mock_error.__class__,
             pidlockfile.remove_existing_pidfile,
             pidfile_path)
 


Index: python-daemon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-daemon/EL-5/python-daemon.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- python-daemon.spec	9 Jan 2010 05:54:42 -0000	1.5
+++ python-daemon.spec	9 Jan 2010 07:28:49 -0000	1.6
@@ -3,7 +3,7 @@
 
 Name:           python-daemon
 Version:        1.5.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Library to implement a well-behaved Unix daemon process
 
 Group:          Development/Languages
@@ -11,6 +11,7 @@ License:        Python
 URL:            http://pypi.python.org/pypi/python-daemon/
 Source0:        http://pypi.python.org/packages/source/p/python-daemon/%{name}-%{version}.tar.gz
 Patch0:         %{name}-%{version}-import.patch
+Patch1:         %{name}-%{version}-py24-exc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
@@ -25,6 +26,7 @@ This library implements the well-behaved
 %prep
 %setup -q
 %patch0 -p0 -b .import
+%patch1 -p0 -b .py24-exc
 
 sed -i -e '/^#!\//, 1d' daemon/version/version_info.py
 
@@ -52,6 +54,10 @@ PYTHONPATH=$(pwd) nosetests
 %{python_sitelib}/python_daemon-%{version}-py%{pyver}.egg-info/
 
 %changelog
+* Fri Jan 08 2010 Luke Macken <lmacken at redhat.com> - 1.5.2-3
+- Add python-daemon-1.5.2-py24-exc.patch to fix a few
+  unit tests on python 2.4
+
 * Fri Jan 08 2010 Luke Macken <lmacken at redhat.com> - 1.5.2-2
 - Add python-daemon-1.5.2-import.patch, which fixes the use of
   __import__ to work on Python 2.4




More information about the fedora-extras-commits mailing list