Files
poky/meta/lib/oeqa/sdk/cases/python.py
Alexander Kanavin ec6149d000 oeqa/sdk: drop the nativesdk-python 2.x test
Python 2.x has been EOL for a while, and so this test
never runs.

(From OE-Core rev: 53eca714b874d2cd323ab6d3e11641fdf746a980)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b687627e9cffb8123c156413f55ea1929f1a7831)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-08 08:27:16 +01:00

21 lines
645 B
Python

#
# SPDX-License-Identifier: MIT
#
import subprocess, unittest
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
class Python3Test(OESDKTestCase):
def setUp(self):
if not (self.tc.hasHostPackage("nativesdk-python3-core") or
self.tc.hasHostPackage("python3-core-native")):
raise unittest.SkipTest("No python3 package in the SDK")
def test_python3(self):
cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
output = self._run(cmd)
self.assertEqual(output, "Hello, world\n")