[Python-modules-commits] [faker] 03/03: Remove century tests
Brian May
bam at moszumanska.debian.org
Tue Jan 31 06:32:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository faker.
commit ae7f415511ffb46b06f4696497b589baa239943c
Author: Brian May <bam at debian.org>
Date: Tue Jan 31 17:32:05 2017 +1100
Remove century tests
---
debian/changelog | 1 +
debian/patches/0002-Remove-century-tests.patch | 42 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 44 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f07ca2d..6ed8457 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ faker (0.7.7-2) UNRELEASED; urgency=medium
* Fix Non-determistically FTBFS due to tests sometimes exposing
UnboundLocalError. Closes: #849333.
+ * Remove century tests. Closes: #849652.
-- Brian May <bam at debian.org> Sun, 29 Jan 2017 08:58:05 +1100
diff --git a/debian/patches/0002-Remove-century-tests.patch b/debian/patches/0002-Remove-century-tests.patch
new file mode 100644
index 0000000..8dbd32f
--- /dev/null
+++ b/debian/patches/0002-Remove-century-tests.patch
@@ -0,0 +1,42 @@
+From: Brian May <bam at debian.org>
+Date: Tue, 31 Jan 2017 08:13:06 +1100
+Subject: Remove century tests
+
+These currently fail on i386. See:
+http://bugs.debian.org/849652
+---
+ faker/tests/__init__.py | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
+index 5be08e5..bc89f40 100644
+--- a/faker/tests/__init__.py
++++ b/faker/tests/__init__.py
+@@ -384,9 +384,6 @@ class FactoryTestCase(unittest.TestCase):
+ def test_date_time_this_period(self):
+ from faker.providers.date_time import Provider
+ 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()))
+@@ -415,17 +412,12 @@ 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()
+ with self.assertRaises(TypeError):
+ provider.date_time_this_month(after_now=False, tzinfo=utc) <= datetime.datetime.now()
+
+- # 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))
diff --git a/debian/patches/series b/debian/patches/series
index fb7bc4d..12a7e5d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-Correct-UnboundLocalError-in-Finnish-SSN-generator.patch
+0002-Remove-century-tests.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/faker.git
More information about the Python-modules-commits
mailing list