support/testing: add new test for python-jmespath
Add a new rudimentary test inspired by the examples from jmespath's README file ([1]). [1]: https://github.com/jmespath/jmespath.py/blob/develop/README.rst Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be> [Thomas: add entry in DEVELOPERS file] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
a38da5e3ca
commit
dfa0c8e3a8
@ -2435,8 +2435,10 @@ F: package/python-jmespath/
|
||||
F: package/python-pymupdf/
|
||||
F: package/python-rsa/
|
||||
F: package/python-s3transfer/
|
||||
F: support/testing/tests/package/sample_python_jmespath.py
|
||||
F: support/testing/tests/package/sample_python_rsa.py
|
||||
F: support/testing/tests/package/sample_python_s3transfer.py
|
||||
F: support/testing/tests/package/test_python_jmespath.py
|
||||
F: support/testing/tests/package/test_python_rsa.py
|
||||
F: support/testing/tests/package/test_python_s3transfer.py
|
||||
|
||||
|
4
support/testing/tests/package/sample_python_jmespath.py
Normal file
4
support/testing/tests/package/sample_python_jmespath.py
Normal file
@ -0,0 +1,4 @@
|
||||
import jmespath
|
||||
expression = jmespath.compile('foo.bar')
|
||||
res = expression.search({'foo': {'bar': 'baz'}})
|
||||
assert res == "baz", "expression.search failed"
|
12
support/testing/tests/package/test_python_jmespath.py
Normal file
12
support/testing/tests/package/test_python_jmespath.py
Normal file
@ -0,0 +1,12 @@
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy3Jmespath(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_JMESPATH=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_jmespath.py"]
|
||||
timeout = 10
|
Loading…
Reference in New Issue
Block a user