[glib: 11/12] tests/gobject-query.py: make it work on msys2/win32




commit 8c0fa77a714cf45f52c8ea57b29d6067d6bf4354
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Oct 14 17:24:57 2022 +0400

    tests/gobject-query.py: make it work on msys2/win32
    
    For unclear reasons, universal_newlines=True doesn't seem to set the
    text encoding correctly. Even if I set only encoding='utf-8', the test
    fails. The combination here works for me, \o/.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 gobject/tests/gobject-query.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gobject/tests/gobject-query.py b/gobject/tests/gobject-query.py
index 0325f70d23..84370a151f 100644
--- a/gobject/tests/gobject-query.py
+++ b/gobject/tests/gobject-query.py
@@ -69,7 +69,8 @@ class TestGobjectQuery(unittest.TestCase):
             stdout=subprocess.PIPE,
             stderr=subprocess.PIPE,
             env=env,
-            universal_newlines=True,
+            text=True,
+            encoding='utf-8',
         )
         info.check_returncode()
         out = info.stdout.strip()


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