[pyexiv2] Make unit tests working again. (upstream bug 624999)

Matej Cepl mcepl at fedoraproject.org
Mon Oct 25 20:43:29 UTC 2010


commit a4aaf08abcf64182d77699e7bb55354315eb289c
Author: Matěj Cepl <mcepl at redhat.com>
Date:   Mon Oct 25 22:43:41 2010 +0200

    Make unit tests working again. (upstream bug 624999)

 pyexiv2.spec                                       |    2 +
 ...p_bug_624999-fix-atime-typo-in-unit-tests.patch |   31 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/pyexiv2.spec b/pyexiv2.spec
index 5edf8ac..8bbc014 100644
--- a/pyexiv2.spec
+++ b/pyexiv2.spec
@@ -11,6 +11,7 @@ License:        GPLv2+
 URL:            http://tilloy.net/dev/pyexiv2/
 Source0:        http://launchpad.net/pyexiv2/0.2.x/%{version}/+download/pyexiv2-%{version}.tar.bz2
 Patch0:         upstream-lp_bug_624283-Skip-unicode-unit-tests-for-unsupported-encodings.patch
+Patch1:         upstream-lp_bug_624999-fix-atime-typo-in-unit-tests.patch
 
 BuildRequires:  python-devel exiv2-devel boost-devel scons
 
@@ -23,6 +24,7 @@ embedded in image files (JPEG, TIFF, ...).
 %prep
 %setup -q
 %patch0 -p1 -b .fixTests
+%patch1 -p1 -b .fixTimeTestTypo
 
 %build
 # Remove CFLAGS=... for noarch packages (unneeded)
diff --git a/upstream-lp_bug_624999-fix-atime-typo-in-unit-tests.patch b/upstream-lp_bug_624999-fix-atime-typo-in-unit-tests.patch
new file mode 100644
index 0000000..b791208
--- /dev/null
+++ b/upstream-lp_bug_624999-fix-atime-typo-in-unit-tests.patch
@@ -0,0 +1,31 @@
+diff --git a/test/metadata.py b/test/metadata.py
+index 7816277..821a5e8 100644
+--- a/test/metadata.py
++++ b/test/metadata.py
+@@ -103,7 +103,7 @@ class TestImageMetadata(unittest.TestCase):
+         metadata.write(preserve_timestamps=True)
+         stat2 = os.stat(self.pathname)
+         atime2 = round(stat2.st_atime)
+-        mtime2 = round(stat2.st_atime)
++        mtime2 = round(stat2.st_mtime)
+         self.failUnlessEqual(atime2, atime)
+         self.failUnlessEqual(mtime2, mtime)
+ 
+@@ -118,7 +118,7 @@ class TestImageMetadata(unittest.TestCase):
+         metadata.write()
+         stat2 = os.stat(self.pathname)
+         atime2 = round(stat2.st_atime)
+-        mtime2 = round(stat2.st_atime)
++        mtime2 = round(stat2.st_mtime)
+         self.failIfEqual(atime2, atime)
+         self.failIfEqual(mtime2, mtime)
+         metadata.comment = 'Yesterday'
+@@ -126,7 +126,7 @@ class TestImageMetadata(unittest.TestCase):
+         metadata.write(preserve_timestamps=True)
+         stat3 = os.stat(self.pathname)
+         atime3 = round(stat3.st_atime)
+-        mtime3 = round(stat3.st_atime)
++        mtime3 = round(stat3.st_mtime)
+         self.failUnlessEqual(atime3, atime2)
+         self.failUnlessEqual(mtime3, mtime2)
+ 


More information about the scm-commits mailing list