From: Alexander Kanavin Date: Fri, 1 Feb 2019 12:58:54 +0000 (+0100) Subject: lib/oeqa/runtime/cases/gi.py: fix deprecation warning X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~15479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b4302d84e6c9833089bd575c1083fe826082387;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git lib/oeqa/runtime/cases/gi.py: fix deprecation warning With newest Python, the following is printed: PyGIDeprecationWarning: GObject.markup_escape_text is deprecated; use GLib.markup_escape_text instead) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/runtime/cases/gi.py b/meta/lib/oeqa/runtime/cases/gi.py index 19073e52cba..7e16651df74 100644 --- a/meta/lib/oeqa/runtime/cases/gi.py +++ b/meta/lib/oeqa/runtime/cases/gi.py @@ -9,7 +9,7 @@ class GObjectIntrospectionTest(OERuntimeTestCase): @OETestDepends(["ssh.SSHTest.test_ssh"]) @OEHasPackage(["python3-pygobject"]) def test_python(self): - script = """from gi.repository import GObject; print(GObject.markup_escape_text(""))""" + script = """from gi.repository import GLib; print(GLib.markup_escape_text(""))""" status, output = self.target.run("python3 -c '%s'" % script) self.assertEqual(status, 0, msg="Python failed (%s)" % (output)) self.assertEqual(output, "<testing&testing>", msg="Unexpected output (%s)" % output)