index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-09 07:27:18 +0000 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-09 07:27:18 +0000 |
commit | bfa2db7ade84ab233e71e793a103c2d13dac8ed3 (patch) | |
tree | 78570252c3afb50546b5ea4bba87a9c8869bf5fb /community/python-faker | |
parent | 0e5961e6e0038b2d338c1ecea8db71f1155276ac (diff) | |
parent | 43d8fdd33906541c80c7f838a26e0e594a11886a (diff) |
-rw-r--r-- | community/python-faker/PKGBUILD | 15 | ||||
-rw-r--r-- | community/python-faker/remove-century-tests.patch | 38 |
diff --git a/community/python-faker/PKGBUILD b/community/python-faker/PKGBUILD index 87168ec5..891d7841 100644 --- a/community/python-faker/PKGBUILD +++ b/community/python-faker/PKGBUILD @@ -1,15 +1,18 @@ # https://github.com/joke2k/faker/issues/408 # time-tests requiring 64 bit fail on i686 - obviously (year 2100 is not representable with 32 bits) -source+=('remove-century-tests.patch') -sha512sums+=('69d6c7685f49d28bc5a4ea952d6f0f6ab03e7c9956e338fc7e26d6a714de569641b82e95bb30de15b4598b6fbf3fb8e0a497fde2e28bd988fafbeb030bb24f91') - eval "$( declare -f prepare | \ sed ' /^{\s*$/a \ - cd "$srcdir"/faker-$pkgver\ - patch -p1 -i "$srcdir/remove-century-tests.patch"\ - cd "$srcdir" + sed -i '"'"'/\\.date_\\(time_\\)\\?this_century(.*) >= /d'"'"' "$srcdir/faker-$pkgver/tests/providers/test_date_time.py" \ + sed -i '"'"' \ + $! N; \ + /^\\(.\\+\\)\\n\\1$/ ! { \ + P; \ + D; \ + } \ + D; \ + '"'"' "$srcdir/faker-$pkgver/tests/providers/test_date_time.py" \ ' )" diff --git a/community/python-faker/remove-century-tests.patch b/community/python-faker/remove-century-tests.patch deleted file mode 100644 index 57cddebf..00000000 --- a/community/python-faker/remove-century-tests.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- faker-0.8.4/tests/providers/test_date_time.py 2017-09-22 21:52:06.000000000 +0200 -+++ test_date_time.py 2017-09-25 11:14:26.013321696 +0200 -@@ -203,9 +203,6 @@ - return int(time.mktime(value.timetuple())) - - def test_date_time_this_period(self): -- # test century -- self.assertTrue(self._datetime_to_time(self.factory.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.now())) -- self.assertTrue(self._datetime_to_time(self.factory.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.now())) - # test decade - self.assertTrue(self._datetime_to_time(self.factory.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.now())) - self.assertTrue(self._datetime_to_time(self.factory.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.now())) -@@ -231,17 +228,12 @@ - def test_date_time_this_period_with_tzinfo(self): - # ensure all methods provide timezone aware datetimes - with self.assertRaises(TypeError): -- self.factory.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.now() -- with self.assertRaises(TypeError): - self.factory.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.now() - with self.assertRaises(TypeError): - self.factory.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.now() - with self.assertRaises(TypeError): - self.factory.date_time_this_month(after_now=False, tzinfo=utc) <= datetime.now() - -- # test century -- self.assertTrue(self.factory.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.now(utc)) -- self.assertTrue(self.factory.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.now(utc)) - # test decade - self.assertTrue(self.factory.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.now(utc)) - self.assertTrue(self.factory.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.now(utc)) -@@ -268,7 +260,6 @@ - def test_date_this_period(self): - # test century - self.assertTrue(self.factory.date_this_century(after_today=False) <= date.today()) -- self.assertTrue(self.factory.date_this_century(before_today=False, after_today=True) >= date.today()) - # test decade - self.assertTrue(self.factory.date_this_decade(after_today=False) <= date.today()) - self.assertTrue(self.factory.date_this_decade(before_today=False, after_today=True) >= date.today()) |