blob: 66ab4d25f37532eb6095ad8aa4edc100015099d5 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3from oeqa.core.decorator.oeid import OETestID
Brad Bishop977dc1a2019-02-06 16:01:43 -05004from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005
6class PythonTest(OERuntimeTestCase):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007 @OETestID(965)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008 @OETestDepends(['ssh.SSHTest.test_ssh'])
Brad Bishop977dc1a2019-02-06 16:01:43 -05009 @OEHasPackage(['python3-core'])
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010 def test_python3(self):
11 cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
12 status, output = self.target.run(cmd)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 msg = 'Exit status was not 0. Output: %s' % output
14 self.assertEqual(status, 0, msg=msg)
15
16 msg = 'Incorrect output: %s' % output
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017 self.assertEqual(output, "Hello, world", msg=msg)