[pygobject] tests: remove locale test for uppercasing C names



commit 64b02e3017b50a17a087ee821522a1cb8e066f27
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Fri Feb 9 17:06:52 2018 +0100

    tests: remove locale test for uppercasing C names
    
    Someone on IRC had problems running the test suite, and that's not the first
    time, so remove it for now (added in 63c7f17c2248)
    
    The locale generation adds extra dependencies and only works on Linux,
    and while the test does something useful it complicates things too much.
    
    We need to find a better way (in Python if possible) to test for locale
    dependend upper()/lower().

 MANIFEST.in          |  2 +-
 tests/Makefile.am    |  1 -
 tests/te_ST@nouppera | 50 --------------------------------------------------
 tests/test_gi.py     | 31 -------------------------------
 4 files changed, 1 insertion(+), 83 deletions(-)
---
diff --git a/MANIFEST.in b/MANIFEST.in
index a4486fb3..e8aeecbb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -14,6 +14,6 @@ include .gitlab-ci.yml
 recursive-include examples *.py *.am *.png *.css *.ui *.gif *.gresource *.jpg *.xml
 recursive-include gi *.am *.h
 recursive-include pygtkcompat *.am
-recursive-include tests *.py *.c *.h *.xml *.supp *nouppera *.am
+recursive-include tests *.py *.c *.h *.xml *.supp *.am
 recursive-include docs *.rst *.svg LICENSE *.ico *.png *.css *.py *.dia Makefile
 recursive-include .gitlab-ci *.sh *.rst Dockerfile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1e0af4d3..1873ec5f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -112,7 +112,6 @@ EXTRA_DIST = \
        test-floating.h \
        test-thread.h \
        test-unknown.h \
-       te_ST@nouppera \
        org.gnome.test.gschema.xml \
        test_cairo.py \
        test_error.py \
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 39aaf0c6..9be28dbe 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -8,8 +8,6 @@ import unittest
 import tempfile
 import shutil
 import os
-import locale
-import subprocess
 import gc
 import weakref
 import warnings
@@ -1658,35 +1656,6 @@ class TestPointer(unittest.TestCase):
 
 class TestEnum(unittest.TestCase):
 
-    @classmethod
-    def setUpClass(cls):
-        '''Run tests under a test locale.
-
-        Upper case conversion of member names should not be locale specific
-        e.  g. in Turkish, "i".upper() == "i", which gives results like "iNVALiD"
-
-        Run test under a locale which defines toupper('a') == 'a'
-        '''
-        if sys.platform == "darwin" or os.name == "nt":
-            return
-        cls.locale_dir = tempfile.mkdtemp()
-        src = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'te_ST@nouppera')
-        dest = os.path.join(cls.locale_dir, 'te_ST.UTF-8@nouppera')
-        subprocess.check_call(['localedef', '-i', src, '-c', '-f', 'UTF-8', dest])
-        os.environ['LOCPATH'] = cls.locale_dir
-        locale.setlocale(locale.LC_ALL, 'te_ST.UTF-8@nouppera')
-
-    @classmethod
-    def tearDownClass(cls):
-        if sys.platform == "darwin" or os.name == "nt":
-            return
-        locale.setlocale(locale.LC_ALL, 'C')
-        shutil.rmtree(cls.locale_dir)
-        try:
-            del os.environ['LOCPATH']
-        except KeyError:
-            pass
-
     def test_enum(self):
         self.assertTrue(issubclass(GIMarshallingTests.Enum, int))
         self.assertTrue(isinstance(GIMarshallingTests.Enum.VALUE1, GIMarshallingTests.Enum))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]