meta-openembedded/meta-python/recipes-devtools/python/python3-betamax_0.8.1.bb
Gyorgy Sarvari b476f98381 python3-betamax: fix ptests
1. Some tests require internet access. Set a DNS for that, if it is not
available at the start of the test.

2. Added a backported patch that fixes some failing tests, due to a
variable header value contained in a response. (fix-failing-ptest.patch)

3. Added a backported patch that avoids calling pytest fixtures directly.
If not applied, tests calling them are marked as failing by pytest.
(fix-direct-calls-to-test-fixtures.patch)

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-10-20 11:59:36 +02:00

26 lines
698 B
BlitzBasic

DESCRIPTION = "VCR imitation for python requests"
HOMEPAGE = "https://github.com/betamaxpy/betamax"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=61c15f0c146c5fb1a8ce8ba2f310d73c"
SRC_URI += " \
file://run-ptest \
file://fix-failing-ptest.patch \
file://fix-direct-calls-to-test-fixtures.patch \
"
SRC_URI[md5sum] = "b8182d43a200fc126a3bf7555626f964"
SRC_URI[sha256sum] = "5bf004ceffccae881213fb722f34517166b84a34919b92ffc14d1dbd050b71c2"
inherit pypi setuptools3 ptest
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-pytest \
${PYTHON_PN}-requests \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}