[pygobject/pygobject-3-40] tests: fix test with glib 2.68 re GLocalFile



commit 3c8e95786771ea576a2a179fee7929c85a6fe3d2
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Mar 30 08:04:47 2021 +0200

    tests: fix test with glib 2.68 re GLocalFile
    
    Since 2.68 Gio.File.new_for_path("") returns a GDummyFile instead of
    a GLocalFile. We don't really care since we just want to test that there
    is a name despite the type not being in the gir, so just pass a potentially
    valid path instead.

 tests/test_gi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 5e7d0e35..f6552665 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -2406,7 +2406,7 @@ class TestGObject(unittest.TestCase):
 
     def test_nongir_repr(self):
         self.assertRegex(
-            repr(Gio.File.new_for_path("")),
+            repr(Gio.File.new_for_path("/")),
             r"<__gi__.GLocalFile object at 0x[^\s]+ "
             r"\(GLocalFile at 0x[^\s]+\)>")
 


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