[Python-modules-commits] r21017 - in packages/python3-dateutil/trunk/debian/patches (3 files)

takluyver-guest at users.alioth.debian.org takluyver-guest at users.alioth.debian.org
Mon Apr 2 18:53:04 UTC 2012


    Date: Monday, April 2, 2012 @ 18:53:03
  Author: takluyver-guest
Revision: 21017

Use zoneinfo.gettz() tests to test tz.gettz() instead.

Added:
  packages/python3-dateutil/trunk/debian/patches/zoneinfo-tests-to-tz.patch
Modified:
  packages/python3-dateutil/trunk/debian/patches/series
Deleted:
  packages/python3-dateutil/trunk/debian/patches/remove-zoneinfo-tests.patch

Deleted: packages/python3-dateutil/trunk/debian/patches/remove-zoneinfo-tests.patch
===================================================================
--- packages/python3-dateutil/trunk/debian/patches/remove-zoneinfo-tests.patch	2012-04-02 18:41:16 UTC (rev 21016)
+++ packages/python3-dateutil/trunk/debian/patches/remove-zoneinfo-tests.patch	2012-04-02 18:53:03 UTC (rev 21017)
@@ -1,35 +0,0 @@
-Date: Wed Mar 28 19:00:38 BST 2012
-Author: Thomas Kluyver <thomas at kluyver.me.uk>
-Subject: Remove tests that depend on binary parts.
-
-The binary zoneinfo parts are removed from the repacked source. These
-three tests fail without them.
---- a/test.py
-+++ b/test.py
-@@ -3886,26 +3886,6 @@
-         self.assertEqual(datetime(2003, 10, 26, 0, 59, tzinfo=tz).tzname(), "EDT")
-         self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST")
- 
--    def testZoneInfoFileStart1(self):
--        tz = zoneinfo.gettz("EST5EDT")
--        self.assertEqual(datetime(2003, 4, 6, 1, 59, tzinfo=tz).tzname(), "EST")
--        self.assertEqual(datetime(2003, 4, 6, 2, 00, tzinfo=tz).tzname(), "EDT")
--
--    def testZoneInfoFileEnd1(self):
--        tz = zoneinfo.gettz("EST5EDT")
--        self.assertEqual(datetime(2003, 10, 26, 0, 59, tzinfo=tz).tzname(), "EDT")
--        self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST")
--
--    def testZoneInfoOffsetSignal(self):
--        utc = zoneinfo.gettz("UTC")
--        nyc = zoneinfo.gettz("America/New_York")
--        self.assertFalse(any([None in [utc, nyc]]))
--        t0 = datetime(2007, 11, 4, 0, 30, tzinfo=nyc)
--        t1 = t0.astimezone(utc)
--        t2 = t1.astimezone(nyc)
--        self.assertEqual(t0, t2)
--        self.assertEqual(nyc.dst(t0), timedelta(hours=1))
--
-     def testICalStart1(self):
-         tz = tzical(StringIO(self.TZICAL_EST5EDT)).get()
-         self.assertEqual(datetime(2003, 4, 6, 1, 59, tzinfo=tz).tzname(), "EST")

Modified: packages/python3-dateutil/trunk/debian/patches/series
===================================================================
--- packages/python3-dateutil/trunk/debian/patches/series	2012-04-02 18:41:16 UTC (rev 21016)
+++ packages/python3-dateutil/trunk/debian/patches/series	2012-04-02 18:53:03 UTC (rev 21017)
@@ -2,4 +2,4 @@
 update-readme.patch
 test-3.2.patch
 read-tz.patch
-remove-zoneinfo-tests.patch
+zoneinfo-tests-to-tz.patch

Added: packages/python3-dateutil/trunk/debian/patches/zoneinfo-tests-to-tz.patch
===================================================================
--- packages/python3-dateutil/trunk/debian/patches/zoneinfo-tests-to-tz.patch	                        (rev 0)
+++ packages/python3-dateutil/trunk/debian/patches/zoneinfo-tests-to-tz.patch	2012-04-02 18:53:03 UTC (rev 21017)
@@ -0,0 +1,31 @@
+Date: Mon Apr  2 19:48:46 BST 2012
+Author: Thomas Kluyver <thomas at kluyver.me.uk>
+Subject: Fix Zoneinfo tests
+
+The zoneinfo module depends on binary data which is removed from the source
+package. tz.gettz() should behave in the same way.
+--- a/test.py
++++ b/test.py
+@@ -3887,18 +3887,18 @@
+         self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST")
+ 
+     def testZoneInfoFileStart1(self):
+-        tz = zoneinfo.gettz("EST5EDT")
++        tz = gettz("EST5EDT")
+         self.assertEqual(datetime(2003, 4, 6, 1, 59, tzinfo=tz).tzname(), "EST")
+         self.assertEqual(datetime(2003, 4, 6, 2, 00, tzinfo=tz).tzname(), "EDT")
+ 
+     def testZoneInfoFileEnd1(self):
+-        tz = zoneinfo.gettz("EST5EDT")
++        tz = gettz("EST5EDT")
+         self.assertEqual(datetime(2003, 10, 26, 0, 59, tzinfo=tz).tzname(), "EDT")
+         self.assertEqual(datetime(2003, 10, 26, 1, 00, tzinfo=tz).tzname(), "EST")
+ 
+     def testZoneInfoOffsetSignal(self):
+-        utc = zoneinfo.gettz("UTC")
+-        nyc = zoneinfo.gettz("America/New_York")
++        utc = gettz("UTC")
++        nyc = gettz("America/New_York")
+         self.assertFalse(any([None in [utc, nyc]]))
+         t0 = datetime(2007, 11, 4, 0, 30, tzinfo=nyc)
+         t1 = t0.astimezone(utc)




More information about the Python-modules-commits mailing list