From: Tim Orling <ticotimo@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-python2][zeus][PATCH 1/2] lib/oeqa/runtime/cases: add python2.py
Date: Wed, 29 Jan 2020 22:05:33 -0800 [thread overview]
Message-ID: <20200130060534.5679-1-ticotimo@gmail.com> (raw)
Refactor the python3 test from oe-core to do very
basic acceptance test of python2.
Signed-off-by: Tim Orling <ticotimo@gmail.com>
---
lib/oeqa/runtime/cases/python2.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 lib/oeqa/runtime/cases/python2.py
diff --git a/lib/oeqa/runtime/cases/python2.py b/lib/oeqa/runtime/cases/python2.py
new file mode 100644
index 00000000..8afa2ac9
--- /dev/null
+++ b/lib/oeqa/runtime/cases/python2.py
@@ -0,0 +1,20 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+
+
+class PythonTest(OERuntimeTestCase):
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['python-core'])
+ def test_python(self):
+ cmd = "python -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)
--
2.25.0
next reply other threads:[~2020-01-30 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 6:05 Tim Orling [this message]
2020-01-30 6:05 ` [meta-python2][zeus][PATCH 2/2] kas-meta-python2-ptest-image: add python2 test Tim Orling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200130060534.5679-1-ticotimo@gmail.com \
--to=ticotimo@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.