From 49dbb584d05ab1e5c5048e89973e19397bf0c30a43680e624a0a477557504ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 12 Aug 2014 13:50:27 +0000 Subject: [PATCH] Accepting request 244314 from home:Nijel:branches:devel:languages:python - Run test suite during build (required disabling of one test as it is known to be broken) OBS-URL: https://build.opensuse.org/request/show/244314 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=23 --- fix-tests.patch | 18 ++++++++++++++++++ python-pytz.changes | 6 ++++++ python-pytz.spec | 10 +++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 fix-tests.patch diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..db1407b --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,18 @@ +--- a/pytz/tests/test_tzinfo.py ++++ b/pytz/tests/test_tzinfo.py +@@ -694,15 +694,6 @@ + '1914-01-01 13:40:00 UTC+0000' + ) + +- def no_testCreateLocaltime(self): +- # It would be nice if this worked, but it doesn't. +- tz = pytz.timezone('Europe/Amsterdam') +- dt = datetime(2004, 10, 31, 2, 0, 0, tzinfo=tz) +- self.assertEqual( +- dt.strftime(fmt), +- '2004-10-31 02:00:00 CET+0100' +- ) +- + + class CommonTimezonesTestCase(unittest.TestCase): + def test_bratislava(self): diff --git a/python-pytz.changes b/python-pytz.changes index fb24c0e..f45fe41 100644 --- a/python-pytz.changes +++ b/python-pytz.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 24 09:41:38 UTC 2014 - mcihar@suse.com + +- Run test suite during build (required disabling of one test as + it is known to be broken) + ------------------------------------------------------------------- Wed Jul 23 12:08:31 UTC 2014 - mcihar@suse.cz diff --git a/python-pytz.spec b/python-pytz.spec index 99ace5b..16cd80d 100644 --- a/python-pytz.spec +++ b/python-pytz.spec @@ -24,9 +24,11 @@ License: MIT Group: Development/Languages/Python Url: http://pytz.sourceforge.net Source: http://pypi.python.org/packages/source/p/pytz/pytz-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken +Patch0: fix-tests.patch BuildRequires: fdupes BuildRequires: python-devel -#BuildRequires: python-nose +BuildRequires: python-nose BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -49,6 +51,8 @@ Amost all of the Olson timezones are supported. %prep %setup -q -n pytz-%{version} +# Disable test which is not working (and documented so) +%patch0 -p1 # For rpmlint warning: remove shebang from python library: sed -i '/^#!/d' ./pytz/tzfile.py @@ -59,8 +63,8 @@ python setup.py build python setup.py install --prefix=%{_prefix} --root=%{buildroot} %fdupes %{buildroot}%{python_sitelib} -#%%check -#nosetests +%check +nosetests %files %defattr(-,root,root,-)