git: 62cbc4c2937d - main - devel/py-pytest-cases: Add py-pytest-cases 3.6.14
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 03:13:48 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=62cbc4c2937d93d6082811b6436294d551456e7a commit 62cbc4c2937d93d6082811b6436294d551456e7a Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-09-11 03:03:47 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-09-11 03:03:47 +0000 devel/py-pytest-cases: Add py-pytest-cases 3.6.14 Did you ever think that most of your test functions were actually the same test code, but with different data inputs and expected results/exceptions? - pytest-cases leverages pytest and its great @pytest.mark.parametrize decorator, so that you can separate your test cases from your test functions. - In addition, pytest-cases provides several useful goodies to empower pytest. In particular it improves the fixture mechanism to support "fixture unions". This is a major change in the internal pytest engine, unlocking many possibilities such as using fixture references as parameter values in a test function. See here. pytest-cases is fully compliant with pytest-harvest so you can easily monitor the execution times and created artifacts. With it, it becomes very easy to create a complete data science benchmark, for example comparing various models on various datasets. --- devel/Makefile | 1 + devel/py-pytest-cases/Makefile | 26 ++++++++++++++++++++++++++ devel/py-pytest-cases/distinfo | 3 +++ devel/py-pytest-cases/files/patch-setup.cfg | 10 ++++++++++ devel/py-pytest-cases/pkg-descr | 14 ++++++++++++++ 5 files changed, 54 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 156ebac8f5e8..9100c98775fc 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5349,6 +5349,7 @@ SUBDIR += py-pytest-cache SUBDIR += py-pytest-canonical-data SUBDIR += py-pytest-capturelog + SUBDIR += py-pytest-cases SUBDIR += py-pytest-checkdocs SUBDIR += py-pytest-console-scripts SUBDIR += py-pytest-cov diff --git a/devel/py-pytest-cases/Makefile b/devel/py-pytest-cases/Makefile new file mode 100644 index 000000000000..006f3ac502bb --- /dev/null +++ b/devel/py-pytest-cases/Makefile @@ -0,0 +1,26 @@ +PORTNAME= pytest-cases +PORTVERSION= 3.6.14 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Separate test code from test cases in pytest +WWW= https://smarie.github.io/python-pytest-cases/ \ + https://github.com/smarie/python-pytest-cases + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=39.2:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}decopatch>=0:devel/py-decopatch@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}makefun>=1.9.5:devel/py-makefun@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/py-pytest-cases/distinfo b/devel/py-pytest-cases/distinfo new file mode 100644 index 000000000000..a22575a479c1 --- /dev/null +++ b/devel/py-pytest-cases/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1694348232 +SHA256 (pytest-cases-3.6.14.tar.gz) = 7455e6ca57a544c1bfdd8b56ace08c1c1ce4c6572a8aab8f1bd351dc25a10b6b +SIZE (pytest-cases-3.6.14.tar.gz) = 1083239 diff --git a/devel/py-pytest-cases/files/patch-setup.cfg b/devel/py-pytest-cases/files/patch-setup.cfg new file mode 100644 index 000000000000..8a6cbe6b33cf --- /dev/null +++ b/devel/py-pytest-cases/files/patch-setup.cfg @@ -0,0 +1,10 @@ +--- setup.cfg.orig 2023-02-23 13:18:12 UTC ++++ setup.cfg +@@ -29,7 +29,6 @@ classifiers = + [options] + setup_requires = + setuptools_scm +- pytest-runner + install_requires = + decopatch + makefun>=1.9.5 diff --git a/devel/py-pytest-cases/pkg-descr b/devel/py-pytest-cases/pkg-descr new file mode 100644 index 000000000000..249fb7e59454 --- /dev/null +++ b/devel/py-pytest-cases/pkg-descr @@ -0,0 +1,14 @@ +Did you ever think that most of your test functions were actually the same test +code, but with different data inputs and expected results/exceptions? +- pytest-cases leverages pytest and its great @pytest.mark.parametrize + decorator, so that you can separate your test cases from your test functions. +- In addition, pytest-cases provides several useful goodies to empower pytest. + In particular it improves the fixture mechanism to support "fixture unions". + This is a major change in the internal pytest engine, unlocking many + possibilities such as using fixture references as parameter values in a test + function. See here. + +pytest-cases is fully compliant with pytest-harvest so you can easily monitor +the execution times and created artifacts. With it, it becomes very easy to +create a complete data science benchmark, for example comparing various models +on various datasets.