[Python-modules-commits] r13243 - in packages/logilab-common/trunk/debian (4 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Fri Jun 4 17:27:51 UTC 2010
Date: Friday, June 4, 2010 @ 17:27:30
Author: morph
Revision: 13243
* debian/patches/2c61959ae407
- fixed a repetible FTBFS when build on 2010-05-24, thanks to Stefano Rivera
for the report; Closes: #582949
Added:
packages/logilab-common/trunk/debian/patches/2c61959ae407
Modified:
packages/logilab-common/trunk/debian/changelog
packages/logilab-common/trunk/debian/patches/series
packages/logilab-common/trunk/debian/rules
Modified: packages/logilab-common/trunk/debian/changelog
===================================================================
--- packages/logilab-common/trunk/debian/changelog 2010-06-04 17:00:56 UTC (rev 13242)
+++ packages/logilab-common/trunk/debian/changelog 2010-06-04 17:27:30 UTC (rev 13243)
@@ -8,8 +8,11 @@
- switch to '3.0 (quilt)' source format
* debian/patches/d347bb3985e4
- partial fix for unittests failure
+ * debian/patches/2c61959ae407
+ - fixed a repetible FTBFS when build on 2010-05-24, thanks to Stefano Rivera
+ for the report; Closes: #582949
- -- Sandro Tosi <morph at debian.org> Fri, 04 Jun 2010 18:09:52 +0200
+ -- Sandro Tosi <morph at debian.org> Fri, 04 Jun 2010 19:25:03 +0200
logilab-common (0.50.1-1) unstable; urgency=low
Added: packages/logilab-common/trunk/debian/patches/2c61959ae407
===================================================================
--- packages/logilab-common/trunk/debian/patches/2c61959ae407 (rev 0)
+++ packages/logilab-common/trunk/debian/patches/2c61959ae407 2010-06-04 17:27:30 UTC (rev 13243)
@@ -0,0 +1,40 @@
+
+# HG changeset patch
+# User Julien Jehannet <julien.jehannet at logilab.fr>
+# Date 1275038867 -7200
+# Node ID 2c61959ae407bf30ead9ce6aef06cb61ae079748
+# Parent d347bb3985e4964940c2aaa6e91749d92316dbc4
+Fix nb_open_days() codomain: positive natural numbers are expected
+
+Return only positive natural numbers whatever the number of holiday days in computation.
+
+diff -r d347bb3985e4 -r 2c61959ae407 date.py
+--- a/date.py Fri May 28 10:26:27 2010 +0200
++++ b/date.py Fri May 28 11:27:47 2010 +0200
+@@ -166,7 +166,10 @@
+ open_days = weeks * 5 + plus
+ nb_week_holidays = len([x for x in get_national_holidays(start, end+step)
+ if weekday(x) < 5 and x < end])
+- return open_days - nb_week_holidays
++ open_days -= nb_week_holidays
++ if open_days < 0:
++ return 0
++ return open_days
+
+ def date_range(begin, end, incday=None, incmonth=None):
+ """yields each date between begin and end
+diff -r d347bb3985e4 -r 2c61959ae407 test/unittest_date.py
+--- a/test/unittest_date.py Fri May 28 10:26:27 2010 +0200
++++ b/test/unittest_date.py Fri May 28 11:27:47 2010 +0200
+@@ -114,6 +114,10 @@
+ x = self.now()
+ self.assertOpenDays(x, x, 0)
+
++ def test_open_days_now_now2(self):
++ x = self.datetimecls(2010, 5, 24)
++ self.assertOpenDays(x, x, 0)
++
+ def test_open_days_afternoon_before_holiday(self):
+ self.assertOpenDays(self.datetimecls(2008, 5, 7, 14), self.datetimecls(2008, 5, 8, 0), 1)
+
+
Modified: packages/logilab-common/trunk/debian/patches/series
===================================================================
--- packages/logilab-common/trunk/debian/patches/series 2010-06-04 17:00:56 UTC (rev 13242)
+++ packages/logilab-common/trunk/debian/patches/series 2010-06-04 17:27:30 UTC (rev 13243)
@@ -1 +1,2 @@
d347bb3985e4
+2c61959ae407
Modified: packages/logilab-common/trunk/debian/rules
===================================================================
--- packages/logilab-common/trunk/debian/rules 2010-06-04 17:00:56 UTC (rev 13242)
+++ packages/logilab-common/trunk/debian/rules 2010-06-04 17:27:30 UTC (rev 13243)
@@ -31,7 +31,7 @@
# run tests
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
# use the default python version to select the script dir to run the tests
- PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-$(PYDEF)/pytest -t test
+ -PYTHONPATH=$(CURDIR)/build/lib/ $(CURDIR)/build/scripts-$(PYDEF)/pytest -t test
endif
# build doc
More information about the Python-modules-commits
mailing list