22 lines
740 B
Diff
22 lines
740 B
Diff
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():
|