소스 검색

support/testing: add new test for python-botocore

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@mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Raphaël Mélotte 3 년 전
부모
커밋
9060f1a6b8
2개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      support/testing/tests/package/sample_python_botocore.py
  2. 12 0
      support/testing/tests/package/test_python_botocore.py

+ 3 - 0
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")

+ 12 - 0
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