commit 2f31972991f59f3c16fc302b290673147b621e7c Author: Goran Mekić Date: Sun Dec 22 15:11:46 2019 +0100 Add factory-boy diff --git a/devel/Makefile b/devel/Makefile index 61ae360e8d59..b90d5cf37df7 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4411,6 +4411,7 @@ SUBDIR += py-fabric SUBDIR += py-fabric1 SUBDIR += py-fabric3 + SUBDIR += py-factory-boy SUBDIR += py-fam SUBDIR += py-fastcache SUBDIR += py-fasteners diff --git a/devel/py-factory-boy/Makefile b/devel/py-factory-boy/Makefile new file mode 100644 index 000000000000..bb9e20782522 --- /dev/null +++ b/devel/py-factory-boy/Makefile @@ -0,0 +1,48 @@ +# $FreeBSD$ + +PORTNAME= factory_boy +PORTVERSION= 2.12.0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Create comlex objects for testing purposes + +LICENSE= BSD +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Faker>=0:devel/py-Faker@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage>=0:devel/py-coverage@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django30>=0:www/py-django30@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flake8>=0:devel/py-flake8@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}isort>=0:devel/py-isort@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlalchemy13>=0:databases/py-sqlalchemy13@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mongoengine>=0:databases/py-mongoengine@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tox>=0:devel/py-tox@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}text-unidecode>=0:textproc/py-text-unidecode@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent distutils + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest discover \ + -k test_alchemy \ + -k test_base \ + -k test_declarations \ + -k test_django \ + -k test_docs_internal \ + -k test_faker \ + -k test_fuzzy \ + -k test_helpers \ + -k test_using \ + -k test_utils + +.include diff --git a/devel/py-factory-boy/distinfo b/devel/py-factory-boy/distinfo new file mode 100644 index 000000000000..9164b0c7915c --- /dev/null +++ b/devel/py-factory-boy/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1577021657 +SHA256 (factory_boy-2.12.0.tar.gz) = faf48d608a1735f0d0a3c9cbf536d64f9132b547dae7ba452c4d99a79e84a370 +SIZE (factory_boy-2.12.0.tar.gz) = 153557 diff --git a/devel/py-factory-boy/pkg-descr b/devel/py-factory-boy/pkg-descr new file mode 100644 index 000000000000..1babcb27d5e1 --- /dev/null +++ b/devel/py-factory-boy/pkg-descr @@ -0,0 +1,7 @@ +As a fixtures replacement tool, it aims to replace static, hard to maintain +fixtures with easy-to-use factories for complex object. Instead of building an +exhaustive test setup with every possible combination of corner cases, +factory_boy allows you to use objects customized for the current test, while +only declaring the test-specific fields + +WWW: https://github.com/FactoryBoy/factory_boy