[Buildroot] [PATCH 1/5] support/testing: add new test for python-botocore
Arnout Vandecappelle
arnout at mind.be
Tue Oct 26 19:33:07 UTC 2021
On 24/10/2021 20:12, Raphaël Mélotte wrote:
> 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 <raphael.melotte at mind.be>
Series applied to master, thanks.
Regards,
Arnout
> ---
> .../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
>
More information about the buildroot
mailing list