pygobject3/tests-fix-test-with-glib-2.68-re-GLocalFile.patch

30 lines
994 B
Diff

From 6c17628365abfcd7d5868f6f812390380c0ad1ec Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 30 Mar 2021 08:04:47 +0200
Subject: [PATCH] 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 5e7d0e3..f655266 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]+\)>")
--
1.8.3.1