From 9060f1a6b8638786364ca8d48b2a96b0ad1be1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Sun, 24 Oct 2021 20:12:16 +0200 Subject: [PATCH] support/testing: add new test for python-botocore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a rudimentary test inspired from the "Using botocore" section in the package README ([1]). Note that it doesn't try to use the instantiated client, as this would require a network connection when the test runs. [1]: https://github.com/boto/botocore Signed-off-by: Raphaël Mélotte Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .../testing/tests/package/sample_python_botocore.py | 3 +++ .../testing/tests/package/test_python_botocore.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 support/testing/tests/package/sample_python_botocore.py create mode 100644 support/testing/tests/package/test_python_botocore.py diff --git a/support/testing/tests/package/sample_python_botocore.py b/support/testing/tests/package/sample_python_botocore.py new file mode 100644 index 0000000000..cc4055989f --- /dev/null +++ b/support/testing/tests/package/sample_python_botocore.py @@ -0,0 +1,3 @@ +import botocore.session +session = botocore.session.get_session() +client = session.create_client('ec2', region_name="us-east-1") diff --git a/support/testing/tests/package/test_python_botocore.py b/support/testing/tests/package/test_python_botocore.py new file mode 100644 index 0000000000..6336c5658f --- /dev/null +++ b/support/testing/tests/package/test_python_botocore.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Botocore(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_BOTOCORE=y + """ + sample_scripts = ["tests/package/sample_python_botocore.py"] + timeout = 10