]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/oeqa/runtime/cases/gi.py: fix deprecation warning
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 1 Feb 2019 12:58:54 +0000 (13:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Feb 2019 18:19:09 +0000 (18:19 +0000)
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 <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/gi.py

index 19073e52cbab754c66d6f6200f8ffe2c98362626..7e16651df74d43a7761ba3fb6ce8dbcc5e0e73e1 100644 (file)
@@ -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("<testing&testing>"))"""
+        script = """from gi.repository import GLib; print(GLib.markup_escape_text("<testing&testing>"))"""
         status, output = self.target.run("python3 -c '%s'" % script)
         self.assertEqual(status, 0, msg="Python failed (%s)" % (output))
         self.assertEqual(output, "&lt;testing&amp;testing&gt;", msg="Unexpected output (%s)" % output)