mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
5c4dc9200c
VCR.py simplifies and speeds up tests that make HTTP requests. The first time you run code that is inside a VCR.py context manager or decorated function, VCR.py records all HTTP interactions that take place through the libraries it supports and serializes and writes them to a flat file (in yaml format by default). This flat file is called a cassette. When the relevant peice of code is executed again, VCR.py will read the serialized requests and responses from the aforementioned cassette file, and intercept any HTTP requests that it recognizes from the original test run and return the responses that corresponded to those requests. This means that the requests will not actually result in HTTP traffic, which confers several benefits including: * The ability to work offline * Completely deterministic tests * Increased test execution speed WWW: https://github.com/kevin1024/vcrpy
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
# Created by: Kubilay Kocak <koobs@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= vcrpy
|
|
PORTVERSION= 1.7.4
|
|
DISTVERSIONPREFIX= v.
|
|
CATEGORIES= devel www python
|
|
#MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= koobs@FreeBSD.org
|
|
COMMENT= Automatically mock HTTP interactions to simplify and speed up testing
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \
|
|
${PYTHON_PKGNAMEPREFIX}wrapt>0:${PORTSDIR}/devel/py-wrapt \
|
|
${PYTHON_PKGNAMEPREFIX}six>=1.5:${PORTSDIR}/devel/py-six
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \
|
|
${PYTHON_PKGNAMEPREFIX}pytest-localserver>0:${PORTSDIR}/devel/py-pytest-localserver
|
|
|
|
USES= python
|
|
USE_PYTHON= autoplist distutils
|
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= kevin1024
|
|
|
|
NO_ARCH= yes
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PYTHON_REL} < 3300
|
|
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock \
|
|
${PYTHON_PKGNAMEPREFIX}contextlib2>0:${PORTSDIR}/devel/py-contextlib2
|
|
.endif
|
|
|
|
post-patch:
|
|
${FIND} ${WRKSRC} -name __pycache__ -type d -exec ${RM} -rf {} +
|
|
|
|
do-test:
|
|
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
|
|
|
|
.include <bsd.port.post.mk>
|