pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-agate: disable test for de_DE.UTF-8 because it fails on NetBSD-10.99.10. It fails because of different system-wide locale settings.



Module Name:	pkgsrc-wip
Committed By:	Aleksey Cheusov <vle%gmx.net@localhost>
Pushed By:	cheusov
Date:		Tue May 21 16:25:07 2024 +0400
Changeset:	b2c48cc1868cd83ec42b70497c4e7b2a7d04278b

Modified Files:
	py-agate/distinfo
Added Files:
	py-agate/patches/patch-tests_test__data__types.py

Log Message:
py-agate: disable test for de_DE.UTF-8 because it fails on NetBSD-10.99.10.
It fails because of different system-wide locale settings.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b2c48cc1868cd83ec42b70497c4e7b2a7d04278b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-agate/distinfo                                 |  1 +
 py-agate/patches/patch-tests_test__data__types.py | 43 +++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diffs:
diff --git a/py-agate/distinfo b/py-agate/distinfo
index a961b41cc6..059a3e3b19 100644
--- a/py-agate/distinfo
+++ b/py-agate/distinfo
@@ -3,3 +3,4 @@ $NetBSD$
 BLAKE2s (agate-1.10.2.tar.gz) = 5d41c3c1b4c3bb2bca11f98dc9e10ae230e3b25f620ea260782836f83d9ebe66
 SHA512 (agate-1.10.2.tar.gz) = 87385515e3ffe88afdeaa1202368d69824501dc5816b40e1f475afd027bbd5229c70e7449485e0845f50203e6749f3a736d16f17752d1bdd040dc92cbcc2461a
 Size (agate-1.10.2.tar.gz) = 203542 bytes
+SHA1 (patch-tests_test__data__types.py) = 996104e2185919054ea0fe1307b08fc39cacdf16
diff --git a/py-agate/patches/patch-tests_test__data__types.py b/py-agate/patches/patch-tests_test__data__types.py
new file mode 100644
index 0000000000..8a2972e6f5
--- /dev/null
+++ b/py-agate/patches/patch-tests_test__data__types.py
@@ -0,0 +1,43 @@
+$NetBSD$
+
+Disable locale test for de_DE.UTF_8 because it fails on some systems, for
+example, on NetBSD-10.99.10, where short ids for months are "Jan." (not
+"Jan"), "Dez." (not "Dez") etc.
+
+--- tests/test_data_types.py.orig	2024-04-28 20:24:36.000000000 +0000
++++ tests/test_data_types.py
+@@ -259,20 +259,20 @@ class TestDate(unittest.TestCase):
+             None
+         ))
+ 
+-    def test_cast_format_locale(self):
+-        date_type = Date(date_format='%d-%b-%Y', locale='de_DE.UTF-8')
+-
+-        # March can be abbreviated to Mrz or Mär depending on the locale version,
+-        # so we use December in the first value to ensure the test passes everywhere
+-        values = ('01-Dez-1994', '17-Feb-2011', None, '05-Jan-1984', 'n/a')
+-        casted = tuple(date_type.cast(v) for v in values)
+-        self.assertSequenceEqual(casted, (
+-            datetime.date(1994, 12, 1),
+-            datetime.date(2011, 2, 17),
+-            None,
+-            datetime.date(1984, 1, 5),
+-            None
+-        ))
++#    def test_cast_format_locale(self):
++#        date_type = Date(date_format='%d-%b-%Y', locale='de_DE.UTF-8')
++#
++#        # March can be abbreviated to Mrz or Mär depending on the locale version,
++#        # so we use December in the first value to ensure the test passes everywhere
++#        values = ('01-Dez-1994', '17-Feb-2011', None, '05-Jan-1984', 'n/a')
++#        casted = tuple(date_type.cast(v) for v in values)
++#        self.assertSequenceEqual(casted, (
++#            datetime.date(1994, 12, 1),
++#            datetime.date(2011, 2, 17),
++#            None,
++#            datetime.date(1984, 1, 5),
++#            None
++#        ))
+ 
+     def test_cast_locale(self):
+         date_type = Date(locale='fr_FR')


Home | Main Index | Thread Index | Old Index