summary refs log tree commit diff
path: root/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-03-03 16:55:43 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-03-03 16:55:43 +0100
commit3f98071ac5d8ffa722b2cf9c74c9c38bf413f059 (patch)
tree494c4af6cfc996d6acd764025bb78f1a1598d5c9 /gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
parent0a77fdf4b8732598e341a6793503ea4847e0c760 (diff)
parent2bb12f5a68f6547b3de295c22c2886aaa0415e47 (diff)
downloadguix-3f98071ac5d8ffa722b2cf9c74c9c38bf413f059.tar.gz
Merge branch 'python-tests'
Diffstat (limited to 'gnu/packages/patches/python-fake-factory-fix-build-32bit.patch')
-rw-r--r--gnu/packages/patches/python-fake-factory-fix-build-32bit.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
new file mode 100644
index 0000000000..cb60896fad
--- /dev/null
+++ b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch
@@ -0,0 +1,36 @@
+These tests fail on 32-bit due to an overflow.
+
+Upstream bug URL: https://github.com/joke2k/faker/issues/408
+
+diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
+index 6026772..58b6b83 100644
+--- a/faker/tests/__init__.py
++++ b/faker/tests/__init__.py
+@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase):
+         provider = Provider
+         # test century
+         self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
+-        self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
+         # test decade
+         self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
+         self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
+@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase):
+ 
+         # ensure all methods provide timezone aware datetimes
+         with self.assertRaises(TypeError):
+-            provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now()
+-        with self.assertRaises(TypeError):
+             provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now()
+         with self.assertRaises(TypeError):
+             provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now()
+@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase):
+ 
+         # test century
+         self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
+-        self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
+         # test decade
+         self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
+         self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
+-- 
+2.11.1
+