summaryrefslogtreecommitdiffstats
path: root/support/testing
diff options
context:
space:
mode:
authorRicardo Martincoski <ricardo.martincoski@gmail.com>2018-11-16 01:57:33 -0200
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-11-23 22:05:46 +0100
commitac010beec5c904d27495fced006ac37f6e95c71b (patch)
tree99b358bff4947cb4f953a37f8399f3d03ba11a6c /support/testing
parentd144edb21d4b1c1f7fe2ed1e42e55cb2f081d826 (diff)
downloadbuildroot-ac010beec5c904d27495fced006ac37f6e95c71b.tar.gz
buildroot-ac010beec5c904d27495fced006ac37f6e95c71b.zip
support/testing: add python-subprocess32 test
Add a simple test case to check the basic usage by calling 'ls' and checking the output. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'support/testing')
-rw-r--r--support/testing/tests/package/sample_python_subprocess32.py6
-rw-r--r--support/testing/tests/package/test_python_subprocess32.py11
2 files changed, 17 insertions, 0 deletions
diff --git a/support/testing/tests/package/sample_python_subprocess32.py b/support/testing/tests/package/sample_python_subprocess32.py
new file mode 100644
index 0000000000..8579745cc8
--- /dev/null
+++ b/support/testing/tests/package/sample_python_subprocess32.py
@@ -0,0 +1,6 @@
+import subprocess32
+
+output = subprocess32.check_output(["ls", "-l", "/dev/null"])
+print(output)
+assert("/dev/null" in output)
+assert("No such" not in output)
diff --git a/support/testing/tests/package/test_python_subprocess32.py b/support/testing/tests/package/test_python_subprocess32.py
new file mode 100644
index 0000000000..d2878046d1
--- /dev/null
+++ b/support/testing/tests/package/test_python_subprocess32.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy2Subprocess32(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON=y
+ BR2_PACKAGE_PYTHON_SUBPROCESS32=y
+ """
+ sample_scripts = ["tests/package/sample_python_subprocess32.py"]
OpenPOWER on IntegriCloud