summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/lib/oeqa/runtime/cases/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/lib/oeqa/runtime/cases/python.py')
-rw-r--r--external/poky/meta/lib/oeqa/runtime/cases/python.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/external/poky/meta/lib/oeqa/runtime/cases/python.py b/external/poky/meta/lib/oeqa/runtime/cases/python.py
new file mode 100644
index 00000000..66ab4d25
--- /dev/null
+++ b/external/poky/meta/lib/oeqa/runtime/cases/python.py
@@ -0,0 +1,17 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
+
+class PythonTest(OERuntimeTestCase):
+ @OETestID(965)
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['python3-core'])
+ def test_python3(self):
+ cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
+ status, output = self.target.run(cmd)
+ msg = 'Exit status was not 0. Output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ msg = 'Incorrect output: %s' % output
+ self.assertEqual(output, "Hello, world", msg=msg)