summaryrefslogtreecommitdiff
path: root/dev-python/pycountry/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-python/pycountry/files
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-python/pycountry/files')
-rw-r--r--dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch b/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch
new file mode 100644
index 000000000000..2de5d0bb7630
--- /dev/null
+++ b/dev-python/pycountry/files/pycountry-22.3.5-fix-tests-for-pypy3.patch
@@ -0,0 +1,21 @@
+commit 57a64b69704640bd85270d886c369ef5a31eee80
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Thu Sep 17 13:01:07 2020 +0200
+
+ Do not rely on CPython-specific __builtins__ for tests
+
+ This makes test_locales pass with PyPy3.
+
+diff --git a/src/pycountry/tests/test_general.py b/src/pycountry/tests/test_general.py
+index ea697ae..ad1090f 100644
+--- a/src/pycountry/tests/test_general.py
++++ b/src/pycountry/tests/test_general.py
+@@ -149,7 +149,7 @@ def test_locales():
+ german = gettext.translation(
+ "iso3166", pycountry.LOCALES_DIR, languages=["de"])
+ german.install()
+- assert __builtins__["_"]("Germany") == "Deutschland"
++ assert _("Germany") == "Deutschland"
+
+
+ def test_removed_countries():