Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | import os |
| 2 | |
| 3 | from oeqa.runtime.case import OERuntimeTestCase |
| 4 | from oeqa.core.decorator.depends import OETestDepends |
| 5 | from oeqa.runtime.decorator.package import OEHasPackage |
| 6 | |
| 7 | class GObjectIntrospectionTest(OERuntimeTestCase): |
| 8 | |
| 9 | @OETestDepends(["ssh.SSHTest.test_ssh"]) |
| 10 | @OEHasPackage(["python3-pygobject"]) |
| 11 | def test_python(self): |
| 12 | script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))""" |
| 13 | status, output = self.target.run("python3 -c '%s'" % script) |
| 14 | self.assertEqual(status, 0, msg="Python failed (%s)" % (output)) |
| 15 | self.assertEqual(output, "<testing&testing>", msg="Unexpected output (%s)" % output) |